Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
585 B

  1. # check if in virtual environment
  2. # https://stackoverflow.com/questions/15454174/how-can-a-shell-function-know-if-it-is-running-within-a-virtualenv/15454916
  3. # python -c 'import sys; print(sys.real_prefix)' 2>/dev/null && INVENV=1 || INVENV=0
  4. # INVENV=$(python -c 'import sys; print ("1" if hasattr(sys, "real_prefix") else "0")')
  5. # if $INVENV is 1, then in virtualenv
  6. # echo $INVENV
  7. # if [ $INVENV -eq 1 ]; then
  8. rm login/migrations/0* api/migrations/0*
  9. sudo -u postgres psql -f reset_db.sql
  10. python manage.py makemigrations
  11. python manage.py migrate
  12. python manage.py runserver
  13. # fi