diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-04-15 18:41:03 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-04-15 18:41:03 (GMT) |
commit | 17f110df8c14ea258d9227d08471a4a82bfa4657 (patch) | |
tree | f2aaf3e4bbf132fa3d0fbbbafca88a420f8225a7 /pv | |
parent | 1d521e1c65babb8412b4959bd476596e0aa36aa6 (diff) | |
parent | 179a462bf561dc0cb4d19133e7e3684055278296 (diff) |
merged master into stable after new deployment
Diffstat (limited to 'pv')
-rw-r--r-- | pv/settings.py | 42 | ||||
-rw-r--r-- | pv/urls.py | 17 | ||||
-rw-r--r-- | pv/wsgi.py | 5 |
3 files changed, 41 insertions, 23 deletions
diff --git a/pv/settings.py b/pv/settings.py index cf1da74..e967b39 100644 --- a/pv/settings.py +++ b/pv/settings.py @@ -1,12 +1,12 @@ # Django settings for pv project. import os.path + PROJECT_DIR = os.path.dirname(__file__) DEBUG = True -TEMPLATE_DEBUG = DEBUG -ADMINS = ( ) +ADMINS = () MANAGERS = ADMINS @@ -21,6 +21,8 @@ DATABASES = { } } +DATABASE_ROUTERS = ['nop.dbrouter.NopRouter'] + TIME_ZONE = 'Europe/Vienna' LANGUAGE_CODE = 'de' @@ -30,20 +32,38 @@ SITE_ID = 1 USE_I18N = True USE_L10N = True -LOCALE_PATHS = os.path.join(PROJECT_DIR, 'locale') +LOCALE_PATHS = ( + os.path.join(PROJECT_DIR, 'locale'), +) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'site_media') MEDIA_URL = '/site_media/' +STATIC_ROOT = os.path.join(PROJECT_DIR, 'static') STATIC_URL = '/static/' SECRET_KEY = '' -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.Loader', -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + os.path.join(PROJECT_DIR, 'templates') + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', @@ -55,10 +75,6 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'pv.urls' -TEMPLATE_DIRS = ( - os.path.join(PROJECT_DIR, "templates"), -) - INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', @@ -74,7 +90,7 @@ INSTALLED_APPS = ( TINYMCE_JS_URL = '/static/js/tiny_mce/tiny_mce.js' TINYMCE_DEFAULT_CONFIG = { - 'plugins' : 'contextmenu', + 'plugins': 'contextmenu', 'theme': 'advanced', 'theme_advanced_toolbar_location': 'top', } @@ -1,19 +1,20 @@ from django.conf import settings -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() from program.views import json_day_schedule + urlpatterns = patterns('', - (r'^admin/', include(admin.site.urls)), - (r'^program/', include('program.urls')), - (r'^nop', include('nop.urls')), - (r'^tinymce/', include('tinymce.urls')), - url(r'^export/day_schedule/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', json_day_schedule), + url(r'^admin/', include(admin.site.urls)), + url(r'^program/', include('program.urls')), + url(r'^nop', include('nop.urls')), + url(r'^tinymce/', include('tinymce.urls')), + url(r'^export/day_schedule/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', json_day_schedule) ) if settings.DEBUG: urlpatterns += patterns('', - (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}) - ) + (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}) +) @@ -13,9 +13,10 @@ middleware here, or combine a Django application with an application of another framework. """ -import os, sys +import os +import sys -sys.path.append('/var/www/pv') +sys.path.append('/srv/pv/pv') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pv.settings") |