mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-26 18:37:12 +00:00
Clean up adh app
This commit is contained in:
parent
58d5b5a9ff
commit
ebfaa8831d
@ -11,7 +11,9 @@ from .models import Profile
|
|||||||
|
|
||||||
|
|
||||||
class ProfileInline(admin.StackedInline):
|
class ProfileInline(admin.StackedInline):
|
||||||
"""Inline user profile in user admin"""
|
"""
|
||||||
|
Inline user profile in user admin
|
||||||
|
"""
|
||||||
model = Profile
|
model = Profile
|
||||||
can_delete = False
|
can_delete = False
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ class Profile(models.Model):
|
|||||||
We do not want to patch the Django Contrib Auth User class
|
We do not want to patch the Django Contrib Auth User class
|
||||||
so this model add an user profile with additional information.
|
so this model add an user profile with additional information.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
GENRES = [
|
GENRES = [
|
||||||
(None, "ND"),
|
(None, "ND"),
|
||||||
("M", "M"),
|
("M", "M"),
|
||||||
@ -31,9 +30,8 @@ class Profile(models.Model):
|
|||||||
avatar = models.ImageField(
|
avatar = models.ImageField(
|
||||||
max_length=255,
|
max_length=255,
|
||||||
blank=True,
|
blank=True,
|
||||||
verbose_name=_('profile picture')
|
verbose_name=_('profile picture'),
|
||||||
)
|
)
|
||||||
|
|
||||||
phone_number = models.CharField(
|
phone_number = models.CharField(
|
||||||
max_length=50,
|
max_length=50,
|
||||||
blank=True,
|
blank=True,
|
||||||
@ -46,24 +44,29 @@ class Profile(models.Model):
|
|||||||
verbose_name=_('section'),
|
verbose_name=_('section'),
|
||||||
help_text=_('e.g. "1A0", "9A♥", "SAPHIRE"'),
|
help_text=_('e.g. "1A0", "9A♥", "SAPHIRE"'),
|
||||||
)
|
)
|
||||||
genre = models.CharField(max_length=1,
|
genre = models.CharField(
|
||||||
|
max_length=1,
|
||||||
blank=False,
|
blank=False,
|
||||||
null=False,
|
null=False,
|
||||||
choices=GENRES
|
choices=GENRES,
|
||||||
|
default=None,
|
||||||
)
|
)
|
||||||
address = models.TextField(
|
address = models.TextField(
|
||||||
blank=True,
|
blank=True,
|
||||||
null=False,
|
null=False,
|
||||||
default=''
|
default='',
|
||||||
)
|
)
|
||||||
remunere = models.BooleanField(verbose_name=_("rémunéré"),
|
paid = models.BooleanField(
|
||||||
|
verbose_name=_("paid"),
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
is_active = models.BooleanField(verbose_name=_("compte actif"),
|
is_active = models.BooleanField(
|
||||||
default=True
|
verbose_name=_("is active"),
|
||||||
|
default=True,
|
||||||
)
|
)
|
||||||
is_deleted = models.BooleanField(verbose_name=_("compte supprimé"),
|
is_deleted = models.BooleanField(
|
||||||
default=False
|
verbose_name=_("is deleted"),
|
||||||
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
Loading…
Reference in New Issue
Block a user