add username

This commit is contained in:
2020-12-10 23:09:32 +00:00
parent 6df2bbfe54
commit c5fe2a5e83
3 changed files with 4 additions and 2 deletions

View File

@@ -59,6 +59,7 @@ class MemberAdmin(admin.ModelAdmin):
'fields': (
('firstname', 'surname',),
'nickname',
'username',
'mailaccount',
'role',
'description',

View File

@@ -10,8 +10,8 @@ class MemberForm(forms.ModelForm):
class Meta:
model = Member
fields = [
'firstname', 'surname', 'nickname', 'mailaccount', 'role', 'description', 'image',
'birthday', 'phone', 'address',
'firstname', 'surname', 'nickname', 'username', 'mailaccount', 'role', 'description',
'image', 'birthday', 'phone', 'address',
]
widgets = {

View File

@@ -89,6 +89,7 @@ class Member(models.Model):
firstname = models.CharField("Vorname", max_length=128)
surname = models.CharField("Nachname", max_length=128)
nickname = models.CharField("Spitzname", max_length=128)
username = models.CharField("Benutzername", null=True, blank=True, max_length=128)
mailaccount = models.CharField("Mailadresse", unique=True, max_length=128)
class MemberRole(models.TextChoices):