mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Fix populate to work with Postgres
This commit is contained in:
@ -13,10 +13,10 @@ class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||
try:
|
||||
os.unlink(os.path.join(root_path, 'db.sqlite3'))
|
||||
os.mkdir(os.path.join(root_path)+'/data')
|
||||
except Exception as e:
|
||||
print(e)
|
||||
call_command('flush')
|
||||
call_command('migrate')
|
||||
if options['prod']:
|
||||
call_command('populate', '--prod')
|
||||
|
Reference in New Issue
Block a user