From: Guillaume Pellerin Date: Wed, 1 Oct 2014 02:54:17 +0000 (+0200) Subject: add local mmmodule X-Git-Tag: 0.6~4^2~33^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=96508ad5e8ada26d394e875391a907708be44e06;p=timeside.git add local mmmodule --- diff --git a/timeside/server/sandbox/settings.py b/timeside/server/sandbox/settings.py index 2890b1f..3ce7cf8 100644 --- a/timeside/server/sandbox/settings.py +++ b/timeside/server/sandbox/settings.py @@ -12,6 +12,9 @@ ADMINS = ( MANAGERS = ADMINS +# Full filesystem path to the project. +PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. @@ -50,9 +53,6 @@ USE_L10N = True # If you set this to False, Django will not use timezone-aware datetimes. USE_TZ = True -# Full filesystem path to the project. -PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) - # Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/media/" MEDIA_ROOT = PROJECT_ROOT + '/media/' @@ -166,4 +166,4 @@ LOGGING = { } REST_FRAMEWORK = { -} \ No newline at end of file +} diff --git a/timeside/server/sandbox/timeside b/timeside/server/sandbox/timeside new file mode 120000 index 0000000..62cc3cd --- /dev/null +++ b/timeside/server/sandbox/timeside @@ -0,0 +1 @@ +../../../timeside \ No newline at end of file diff --git a/timeside/server/sandbox/uwsgi.ini b/timeside/server/sandbox/uwsgi.ini index 94bd251..5cc8ab2 100644 --- a/timeside/server/sandbox/uwsgi.ini +++ b/timeside/server/sandbox/uwsgi.ini @@ -24,8 +24,12 @@ home=/home/me/.virtualenv [base] # chdir to the folder of this config file, plus app/website chdir = %d + # load the module from wsgi.py, it is a python path from # the directory above. -module=wsgi +module = wsgi + # allow anyone to connect to the socket. This is very permissive chmod-socket=666 + +auto-reload = %dwsgi.py \ No newline at end of file diff --git a/timeside/server/sandbox/wsgi.py b/timeside/server/sandbox/wsgi.py index cf8e7eb..f611065 100644 --- a/timeside/server/sandbox/wsgi.py +++ b/timeside/server/sandbox/wsgi.py @@ -13,7 +13,7 @@ middleware here, or combine a Django application with an application of another framework. """ -import os +import os, sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")