mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-04 12:52:15 +02:00
Personal page
This commit is contained in:
@ -50,6 +50,10 @@ class Registration(PolymorphicModel):
|
||||
def type(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def form_class(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def participates(self):
|
||||
return isinstance(self, StudentRegistration) or isinstance(self, CoachRegistration)
|
||||
@ -90,6 +94,11 @@ class StudentRegistration(Registration):
|
||||
def type(self):
|
||||
return _("student")
|
||||
|
||||
@property
|
||||
def form_class(self):
|
||||
from registration.forms import StudentRegistrationForm
|
||||
return StudentRegistrationForm
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("student registration")
|
||||
verbose_name_plural = _("student registrations")
|
||||
@ -113,6 +122,11 @@ class CoachRegistration(Registration):
|
||||
def type(self):
|
||||
return _("coach")
|
||||
|
||||
@property
|
||||
def form_class(self):
|
||||
from registration.forms import CoachRegistrationForm
|
||||
return CoachRegistrationForm
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("coach registration")
|
||||
verbose_name_plural = _("coach registrations")
|
||||
@ -127,6 +141,11 @@ class AdminRegistration(Registration):
|
||||
def type(self):
|
||||
return _("admin")
|
||||
|
||||
@property
|
||||
def form_class(self):
|
||||
from registration.forms import AdminRegistrationForm
|
||||
return AdminRegistrationForm
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("admin registration")
|
||||
verbose_name_plural = _("admin registrations")
|
||||
|
Reference in New Issue
Block a user