X-Git-Url: https://git.mdrn.pl/koed-quiz.git/blobdiff_plain/2c2b8f122dd789a089ac5054e112f59874c01a70..64ce3bd7588fe58d37f94a064721f6108f1ba95b:/koedquiz/settings.py diff --git a/koedquiz/settings.py b/koedquiz/settings.py index 52cd99a..6b17288 100644 --- a/koedquiz/settings.py +++ b/koedquiz/settings.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -# Django settings for koedquiz project. +# This file is part of KOED-Quiz, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os.path PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) @@ -37,8 +39,6 @@ TIME_ZONE = None # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'pl' -SITE_ID = 1 - # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True @@ -60,7 +60,7 @@ MEDIA_URL = '/media/' # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/home/media/media.lawrence.com/static/" -STATIC_ROOT = os.path.join(PROJECT_DIR, '../static') +STATIC_ROOT = os.path.join(PROJECT_DIR, 'static/') # URL prefix for static files. # Example: "http://media.lawrence.com/static/" @@ -93,12 +93,24 @@ TEMPLATE_LOADERS = [ # 'django.template.loaders.eggs.Loader', ] +TEMPLATE_CONTEXT_PROCESSORS = ( + "django.contrib.auth.context_processors.auth", + "django.core.context_processors.debug", + "django.core.context_processors.i18n", + "django.core.context_processors.media", + "django.core.context_processors.static", + "django.core.context_processors.tz", + "django.contrib.messages.context_processors.messages", + "django.core.context_processors.request", +) + MIDDLEWARE_CLASSES = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', + 'quiz.middleware.CurrentQuizMiddleware', ] ROOT_URLCONF = 'koedquiz.urls' @@ -121,8 +133,6 @@ INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.admindocs', - 'south', - 'quiz', ] @@ -151,6 +161,6 @@ LOGGING = { # Load localsettings, if they exist try: - from localsettings import * + from .localsettings import * except ImportError: pass