mirror of
https://github.com/ae-utbm/sith.git
synced 2025-01-11 09:31:12 +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__))))
|
root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||||
try:
|
try:
|
||||||
os.mkdir(os.path.join(root_path)+'/data')
|
os.mkdir(os.path.join(root_path)+'/data')
|
||||||
|
print("Data dir created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
repr(e)
|
||||||
call_command('flush')
|
try:
|
||||||
|
os.remove(os.path.join(root_path, 'db.sqlite3'))
|
||||||
|
print("db.sqlite3 deleted")
|
||||||
|
except Exception as e:
|
||||||
|
repr(e)
|
||||||
call_command('migrate')
|
call_command('migrate')
|
||||||
if options['prod']:
|
if options['prod']:
|
||||||
call_command('populate', '--prod')
|
call_command('populate', '--prod')
|
||||||
|
Loading…
Reference in New Issue
Block a user