Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
d400995e
Commit
d400995e
authored
Jan 07, 2017
by
Skia
🤘
Browse files
Update setup command to ease development
parent
70aaf0b1
Pipeline
#688
passed with stage
in 3 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/management/commands/setup.py
View file @
d400995e
...
...
@@ -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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment