mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-18 04:03:22 +00:00
Update setup command to ease development
This commit is contained in:
parent
70aaf0b1c6
commit
d400995e9d
@ -14,9 +14,14 @@ class Command(BaseCommand):
|
||||
root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||
try:
|
||||
os.mkdir(os.path.join(root_path)+'/data')
|
||||
print("Data dir created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
call_command('flush')
|
||||
repr(e)
|
||||
try:
|
||||
os.remove(os.path.join(root_path, 'db.sqlite3'))
|
||||
print("db.sqlite3 deleted")
|
||||
except Exception as e:
|
||||
repr(e)
|
||||
call_command('migrate')
|
||||
if options['prod']:
|
||||
call_command('populate', '--prod')
|
||||
|
Loading…
Reference in New Issue
Block a user