mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Club model implementation, various other changes
This commit is contained in:
@ -6,6 +6,7 @@ from django.conf import settings
|
||||
|
||||
from core.models import Group, User, Page, PageRev
|
||||
from accounting.models import Customer, GeneralJournal, ProductType, Product
|
||||
from club.models import Club
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Set up a new instance of the Sith AE"
|
||||
@ -28,6 +29,10 @@ class Command(BaseCommand):
|
||||
u.save()
|
||||
for g in settings.AE_GROUPS.values():
|
||||
Group(id=g['id'], name=g['name']).save()
|
||||
Club(name=settings.AE_MAIN_CLUB['name'], unix_name=settings.AE_MAIN_CLUB['unix_name'],
|
||||
address=settings.AE_MAIN_CLUB['address']).save()
|
||||
|
||||
# Here we add a lot of test datas, that are not necessary for the Sith, but that provide a basic development environment
|
||||
if not options['prod']:
|
||||
print("Dev mode, adding some test data")
|
||||
s = User(username='skia', last_name="Kia", first_name="S'",
|
||||
|
Reference in New Issue
Block a user