X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=myslice%2Fsettings.py;h=4ce0e3a5bc0810083e313e8d6a5ff64e5774850e;hb=939bb2feb412b520c88decf018ccadc67c3b7782;hp=6c9d949c7e7c9977eb485d9881e75c7b75bee4f4;hpb=484b16eca194516c6a14ad1e000eeef24aa41fd6;p=unfold.git diff --git a/myslice/settings.py b/myslice/settings.py index 6c9d949c..4ce0e3a5 100644 --- a/myslice/settings.py +++ b/myslice/settings.py @@ -1,23 +1,37 @@ # Django settings for myslice project. +import os.path + DEBUG = True TEMPLATE_DEBUG = DEBUG +# change these if you use a different convention + +DEVELOPER_ROOT=os.path.expanduser("~/git/myslice-django") + +PRODUCTION_ROOT="/root/myslice" + +#################### ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS -## guess if we run on the 'prod' site (:) or on a working laptop +#################### +# guess if we run on the 'prod' site (:) that for now uses /root/myslice and run manage.py +# or on a working laptop, in which case we use ~/git/myslice-django import os, os.path ROOT='' def init_root (): global ROOT - if os.path.exists("/root/myslice"): - ROOT="/root/myslice" + if os.path.exists(PRODUCTION_ROOT): + ROOT=PRODUCTION_ROOT + elif os.path.exists (DEVELOPER_ROOT): + ROOT=DEVELOPER_ROOT else: - ROOT=os.path.expanduser("~/git/myslice-django") + raise Exception,"Cannot find ROOT for myslice (neither %s nor %s)"%(PRODUCTION_ROOT,DEVELOPER_ROOT) + init_root() DATABASES = { @@ -78,6 +92,7 @@ STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. + os.path.join(ROOT,'static'), ) # List of finder classes that know how to find static files in @@ -127,7 +142,13 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', + # see details in devel/django-insert-above-1.0-4 + 'insert_above', 'myslice', + 'auth', + 'engine', + 'plugins', + 'slice', # Uncomment the next line to enable the admin: # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: @@ -163,4 +184,9 @@ LOGGING = { } } -AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', ) +AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', 'auth.manifold_backend.ManifoldBackend', ) + +#################### for insert_above +#IA_JS_FORMAT = "