mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-31 06:39:31 +00:00
Fix populate to work with Postgres
This commit is contained in:
1 parent
e29e94711a
commit
67114f51e1
3 files changed
+13
-8
No files matched your search
@@ -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