]> git.parisson.com Git - telemeta.git/commitdiff
fix warchmedo patterns, cleanup
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 20 Apr 2016 20:13:42 +0000 (22:13 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 20 Apr 2016 20:13:42 +0000 (22:13 +0200)
app/scripts/app.sh
app/worker.py
app/wsgi.py
telemeta/models/item.py

index 747a5c4783a345092536ba321d40a4a7bdd89b36..46d4b3a4cbd8e332552f856c13dbbed53d83d64c 100644 (file)
@@ -15,6 +15,7 @@ threads=8
 autoreload=3
 uid='www-data'
 gid='www-data'
+patterns='*.js;*.css;*.jpg;*.jpeg;*.gif;*.png;*.svg;*.ttf;*.eot;*.woff;*.woff2'
 
 # stating apps
 # pip install django-bootstrap3==6.2.1
@@ -45,7 +46,7 @@ if [ $1 = "--runserver" ]; then
     python $manage runserver_plus 0.0.0.0:8000
 else
     # static files auto update
-    watchmedo shell-command --patterns="*.js;*.css" --recursive \
+    watchmedo shell-command --patterns="$patterns" --recursive \
         --command='python '$manage' collectstatic --noinput' $src &
 
     # app start
index 7e52b6d2c361b921a1a7898f215d4f0123751056..6d06656d1bec574a9ee2b6715c2d03dad86e024d 100644 (file)
@@ -17,7 +17,7 @@ app.config_from_object('django.conf:settings')
 app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
 # app.conf.update(
 #     CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend',
-# ) 
+# )
 
 @app.task(bind=True)
 def debug_task(self):
index a16968d427955cf8686d073baabf0f8471f34e7e..5eacdab9ab6114c85469cc0451f71ba6ff1b048c 100644 (file)
@@ -1,17 +1,10 @@
-#!/usr/bin/python2.5
+#!/usr/bin/python
 # -*- coding: utf-8 -*-
 
 import os
 import sys
+from django.core.wsgi import get_wsgi_application
 
 sys.path.append(os.path.dirname('.'))
-
-# os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
-#
-# import django.core.handlers.wsgi
-# application = django.core.handlers.wsgi.WSGIHandler()
-
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
-
-from django.core.wsgi import get_wsgi_application
 application = get_wsgi_application()
index 7e084c4d22b5438234f1b211db5b54547ceb20ca..0e68a8e1f81f73650427722024a2add628d66ca5 100644 (file)
@@ -191,6 +191,7 @@ class MediaItem(MediaResource):
 
     def get_source(self):
         source = None
+        source_type = None
         if self.file and os.path.exists(self.file.path):
             source = self.file.path
             source_type = 'file'