No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 26 deletions
-
3api/views.py
-
39graphs/static/graphs/scripts/audio_feat_graph.js
-
16graphs/templates/graphs/features_graphs.html
-
16reset_db.sh
@ -1,15 +1,15 @@ |
|||||
# check if in virtual environment |
# check if in virtual environment |
||||
# https://stackoverflow.com/questions/15454174/how-can-a-shell-function-know-if-it-is-running-within-a-virtualenv/15454916 |
# https://stackoverflow.com/questions/15454174/how-can-a-shell-function-know-if-it-is-running-within-a-virtualenv/15454916 |
||||
|
|
||||
# python -c 'import sys; print(sys.real_prefix)' 2>/dev/null && INVENV=1 || INVENV=0 |
|
||||
|
python -c 'import sys; print(sys.real_prefix)' 2>/dev/null && INVENV=1 || INVENV=0 |
||||
# INVENV=$(python -c 'import sys; print ("1" if hasattr(sys, "real_prefix") else "0")') |
# INVENV=$(python -c 'import sys; print ("1" if hasattr(sys, "real_prefix") else "0")') |
||||
|
|
||||
# if $INVENV is 1, then in virtualenv |
# if $INVENV is 1, then in virtualenv |
||||
# echo $INVENV |
# echo $INVENV |
||||
# if [ $INVENV -eq 1 ]; then |
|
||||
rm login/migrations/0* api/migrations/0* |
|
||||
sudo -u postgres psql -f reset_db.sql |
|
||||
python manage.py makemigrations |
|
||||
python manage.py migrate |
|
||||
python manage.py runserver |
|
||||
# fi |
|
||||
|
if [ $INVENV -eq 1 ]; then |
||||
|
rm login/migrations/0* api/migrations/0* |
||||
|
sudo -u postgres psql -f reset_db.sql |
||||
|
python manage.py makemigrations login api |
||||
|
python manage.py migrate |
||||
|
python manage.py runserver |
||||
|
fi |
Write
Preview
Loading…
Cancel
Save
Reference in new issue