Commit 04dd1f0619dbb3b329e1c29d75b27961072f2cfa

Authored by haribo
1 parent 6cffa40e
Exists in master and in 1 other branch dev

Fix install (conflit entre les fixtures et la création du superuser)

Showing 1 changed file with 10 additions and 3 deletions   Show diff stats
install/install_requirements.sh
... ... @@ -45,6 +45,9 @@ MAKE_MIGRATIONS="-Make migrations for DB models"
45 45 LOAD_FIXTURES="-Loading fixtures ..."
46 46 FINAL_MESSAGE="-Please run './pyrosrun server' then go to localhost:$PORT/admin and log in with these id"
47 47  
  48 +# Deactivate the venv in case it is activated
  49 +deactivate 2> /dev/null
  50 +
48 51 # Getting python location
49 52 PYTHON_DIR=`which $PYTHON`
50 53 if [ $? -ne 0 ]; then
... ... @@ -143,13 +146,17 @@ if [ $? -ne 0 ]; then
143 146 exit
144 147 fi
145 148  
  149 +
  150 +# There is no need to create the superuser, because it is in the fixtures
  151 +# echo $CREATE_SUPERUSER
  152 +# echo $CREATE_SUPERUSER_SCRIPT | python ../src/manage.py shell
  153 +
146 154 echo $LOAD_FIXTURES
147 155 python manage.py loaddata fixtures/initial_fixture.json
148 156  
149   -echo $CREATE_SUPERUSER
150   -echo $CREATE_SUPERUSER_SCRIPT | python ../src/manage.py shell
151   -
152 157 echo $TELL_SUPERUSER_CREATION
  158 +
  159 +
153 160 read -n1 -r -p "Press any key to continue..." key
154 161 echo $FINAL_MESSAGE
155 162 read -n1 -r -p "Press any key to continue..." key
... ...