mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
replace MetaGroups by proper group management
This commit is contained in:
@ -118,18 +118,18 @@ class Command(BaseCommand):
|
||||
self.make_important_citizen(u)
|
||||
|
||||
def make_clubs(self):
|
||||
"""Create all the clubs (:class:`club.models.Club`).
|
||||
"""Create all the clubs [club.models.Club][].
|
||||
|
||||
After creation, the clubs are stored in `self.clubs` for fast access later.
|
||||
Don't create the meta groups (:class:`core.models.MetaGroup`)
|
||||
nor the pages of the clubs (:class:`core.models.Page`).
|
||||
Don't create the groups associated to the clubs
|
||||
nor the pages of the clubs ([core.models.Page][]).
|
||||
"""
|
||||
self.clubs = []
|
||||
for i in range(self.NB_CLUBS):
|
||||
self.clubs.append(Club(unix_name=f"galaxy-club-{i}", name=f"club-{i}"))
|
||||
# We don't need to create corresponding groups here, as the Galaxy doesn't care about them
|
||||
Club.objects.bulk_create(self.clubs)
|
||||
self.clubs = list(Club.objects.filter(unix_name__startswith="galaxy-").all())
|
||||
self.clubs = Club.objects.bulk_create(
|
||||
[
|
||||
Club(unix_name=f"galaxy-club-{i}", name=f"club-{i}")
|
||||
for i in range(self.NB_CLUBS)
|
||||
]
|
||||
)
|
||||
|
||||
def make_users(self):
|
||||
"""Create all the users and store them in `self.users` for fast access later.
|
||||
|
Reference in New Issue
Block a user