mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Make core.User
inherit from AbstractUser
instead of AbstractBaseUser
This commit is contained in:
@ -261,19 +261,19 @@ class Command(BaseCommand):
|
||||
User.groups.through.objects.bulk_create(
|
||||
[
|
||||
User.groups.through(
|
||||
realgroup_id=settings.SITH_GROUP_COUNTER_ADMIN_ID, user=counter
|
||||
group_id=settings.SITH_GROUP_COUNTER_ADMIN_ID, user=counter
|
||||
),
|
||||
User.groups.through(
|
||||
realgroup_id=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID, user=comptable
|
||||
group_id=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID, user=comptable
|
||||
),
|
||||
User.groups.through(
|
||||
realgroup_id=settings.SITH_GROUP_COM_ADMIN_ID, user=comunity
|
||||
group_id=settings.SITH_GROUP_COM_ADMIN_ID, user=comunity
|
||||
),
|
||||
User.groups.through(
|
||||
realgroup_id=settings.SITH_GROUP_PEDAGOGY_ADMIN_ID, user=tutu
|
||||
group_id=settings.SITH_GROUP_PEDAGOGY_ADMIN_ID, user=tutu
|
||||
),
|
||||
User.groups.through(
|
||||
realgroup_id=settings.SITH_GROUP_SAS_ADMIN_ID, user=skia
|
||||
group_id=settings.SITH_GROUP_SAS_ADMIN_ID, user=skia
|
||||
),
|
||||
]
|
||||
)
|
||||
|
@ -11,7 +11,7 @@ from django.utils.timezone import localdate, make_aware, now
|
||||
from faker import Faker
|
||||
|
||||
from club.models import Club, Membership
|
||||
from core.models import RealGroup, User
|
||||
from core.models import Group, User
|
||||
from counter.models import (
|
||||
Counter,
|
||||
Customer,
|
||||
@ -225,9 +225,7 @@ class Command(BaseCommand):
|
||||
ae = Club.objects.get(unix_name="ae")
|
||||
other_clubs = random.sample(list(Club.objects.all()), k=3)
|
||||
groups = list(
|
||||
RealGroup.objects.filter(
|
||||
name__in=["Subscribers", "Old subscribers", "Public"]
|
||||
)
|
||||
Group.objects.filter(name__in=["Subscribers", "Old subscribers", "Public"])
|
||||
)
|
||||
counters = list(
|
||||
Counter.objects.filter(name__in=["Foyer", "MDE", "La Gommette", "Eboutic"])
|
||||
|
Reference in New Issue
Block a user