]> git.parisson.com Git - telemeta.git/commitdiff
Merge branch 'dev'
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Sun, 29 Jul 2018 20:23:33 +0000 (22:23 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Sun, 29 Jul 2018 20:23:33 +0000 (22:23 +0200)
1  2 
app/bin/app.sh
app/settings.py
lib/TimeSide
telemeta/forms/language.py
telemeta/forms/system.py
telemeta/models/location.py

diff --cc app/bin/app.sh
index 0000000000000000000000000000000000000000,37568a0385dca4743c42a1757732e6928ae67351..bb9fbecf8a1d9e444cc3571e9b5996d03d2732a9
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,65 +1,66 @@@
 -processes=8
 -threads=8
+ #!/bin/bash
+ # paths
+ app='/srv/app'
+ manage=$app'/manage.py'
+ wsgi=$app'/wsgi.py'
+ static='/srv/static/'
+ media='/srv/media/'
+ lib='/srv/lib/'
+ log='/var/log/uwsgi/app.log'
+ # uwsgi params
+ port=8000
 -# pip install -e git+https://github.com/Parisson/saved_searches.git@dj1.8#egg=saved_searches-2.0.0-beta
++processes=2
++threads=2
+ uid='www-data'
+ gid='www-data'
+ # stating apps
+ # pip uninstall -y south
+ # pip install -U django==1.8.18 django-registration-redux djangorestframework==3.6.4
+ # pip install django-debug-toolbar==1.6
+ # pip install -e git+https://github.com/Parisson/django-jqchat.git@dj1.8#egg=django-jqchat
++# pip install -e git+https://github.com/Parisson/saved_searches.git@dj1.8#egg=saved_searches-2.0.0-beta>>>>>>> dev:app/bin/app.sh
+ # waiting for other network services
+ sh $app/bin/wait.sh
+ python $manage wait-for-db
+ if [ ! -f .init ]; then
+     python $manage migrate --noinput
+     python $manage bower_install -- --allow-root
++    python $manage collectstatic --noinput
+     touch .init
+ fi
+ # telemeta setup
+ python $manage telemeta-create-admin-user
+ python $manage telemeta-create-boilerplate
+ python $manage telemeta-setup-enumerations
+ # Delete Timeside database if it exists
+ cat /srv/lib/telemeta/bin/sql/drop_timeside.sql | python $manage dbshell
+ if [ $REINDEX = "True" ]; then
+     python $manage rebuild_index --noinput
+ fi
+ # choose dev or prod mode
+ if [ "$1" = "--runserver" ]; then
+     python $manage runserver 0.0.0.0:8000
+ else
+     # static files auto update
+     # watchmedo shell-command --patterns="$patterns" --recursive \
+     #     --command='python '$manage' collectstatic --noinput' $lib &
+     python $manage collectstatic --noinput
+     # fix media access rights
+     find $media -maxdepth 1 -path ${media}import -prune -o -type d -not -user www-data -exec chown www-data:www-data {} \;
+     # app start
+     uwsgi --socket :$port --wsgi-file $wsgi --chdir $app --master \
+         --processes $processes --threads $threads \
+         --uid $uid --gid $gid --logto $log --touch-reload $wsgi
+ fi
diff --cc app/settings.py
index 0bb4058c9d466fa7c9f96f80590e26df6d16bee4,1c474d9e5867d953375c1cb9a4112ecad515ddb0..828a7819e6bdf64d941006774a2cad39dd35fc82
@@@ -11,10 -12,9 +12,8 @@@ env = environ.Env(DEBUG=(bool, False)
                    )
  
  # Django settings for server project.
- DEBUG = env('DEBUG') # False if not in os.environ
- DEBUG=True
- TEMPLATE_DEBUG = DEBUG
+ DEBUG = env('DEBUG')  # False if not in os.environ
  
 -
  sys.dont_write_bytecode = True
  
  ALLOWED_HOSTS = ['*']
diff --cc lib/TimeSide
index 86f699cd61db2c0dc7fed61c4bb9f44ca3d8868f,86f699cd61db2c0dc7fed61c4bb9f44ca3d8868f..506b3517fbd981c66372f4b7efce2d333cd2b8d0
@@@ -1,1 -1,1 +1,1 @@@
--Subproject commit 86f699cd61db2c0dc7fed61c4bb9f44ca3d8868f
++Subproject commit 506b3517fbd981c66372f4b7efce2d333cd2b8d0
index 5c7cbeb1307e0454c1ff7df448ccdfe25bfacba5,5f43062a4859b3503ba63a097883d9f1289ef389..99ad81e658715f3dc50c4c495a9e89c3e21feb47
@@@ -22,9 -22,7 +22,9 @@@
  from django.forms import ModelForm
  from telemeta.models import *
  
 +
  class LanguageForm(ModelForm):
 +
      class Meta:
          model = Language
-         fields = ('__all__')
+         fields = '__all__'
index b1ae8e473dc490a9f03e37f8a8d7c2e94ee4e738,ec0e3eb0af61822763c3f1463bd7175c440321f2..e8b5e3ac00fb0d2d0c757d9e3dc085a532181b77
@@@ -24,7 -24,6 +24,7 @@@ from telemeta.models import 
  
  
  class UserProfileForm(ModelForm):
 +
      class Meta:
          model = UserProfile
-         fields = ('__all__')
+         fields = '__all__'
index a731861255791a84021f6f6c2a55dd3d59923117,f675c95c09cf2998e42217c04cd092ede1730d72..cfcfd3cab089041f1a8d7dec502ad9da636c92f1
@@@ -189,10 -189,9 +189,10 @@@ class LocationRelation(ModelCore)
  
  
  class LocationForm(ModelForm):
 +
      class Meta:
          model = Location
-         fields = ('__all__')
+         fields = '__all__'
  
      def __init__(self, *args, **kwds):
          super(LocationForm, self).__init__(*args, **kwds)