Skip to content

Commit

Permalink
first draft of email and phone number backend
Browse files Browse the repository at this point in the history
  • Loading branch information
magsyg committed Sep 14, 2023
1 parent 524fc83 commit f7bb910
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 120 deletions.
1 change: 0 additions & 1 deletion backend/samfundet/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class UserAdmin(CustomGuardedUserAdmin):
]
list_display_links = ['id', 'username']
list_select_related = True

@admin.display(empty_value='all')
def group_memberships(self, obj: User) -> int:
n: int = obj.groups.all().count()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.3 on 2023-09-14 16:35

from django.db import migrations, models
import samfundet.models.utils.fields


class Migration(migrations.Migration):

dependencies = [
('samfundet', '0036_venue_slug'),
]

operations = [
migrations.AddField(
model_name='user',
name='phone_number',
field=samfundet.models.utils.fields.PhoneNumberField(default=59696969, max_length=15, verbose_name='phone_number'),
preserve_default=False,
),
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(error_messages={'unique': 'A user with that email already exists.'}, max_length=254, unique=True, verbose_name='email'),
),
]
Loading

0 comments on commit f7bb910

Please sign in to comment.