X-Git-Url: https://git.mdrn.pl/turniej.git/blobdiff_plain/32597f46cd79051f9cf213aa53d4996dd3093b8a..479cb324a4cbc258f3f6de8de1025e7dccb1da2d:/turniej/settings.py?ds=sidebyside diff --git a/turniej/settings.py b/turniej/settings.py index d09e780..03e2586 100644 --- a/turniej/settings.py +++ b/turniej/settings.py @@ -1,11 +1,9 @@ -# -*- coding: utf-8 -*- # Django settings for turniej project. import os.path PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = False -TEMPLATE_DEBUG = DEBUG ADMINS = [ # ('Your Name', 'your_email@domain.com'), @@ -88,53 +86,36 @@ STATICFILES_FINDERS = ( # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) -# List of callables that know how to import templates from various sources. -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', + 'APP_DIRS': True, + 'DIRS': [ + os.path.join(PROJECT_DIR, 'templates'), + ], + 'OPTIONS': { + 'context_processors': [ + "django.template.context_processors.debug", + "django.template.context_processors.i18n", + "django.template.context_processors.media", + "django.template.context_processors.static", + "django.contrib.messages.context_processors.messages", + "django.template.context_processors.request", + ], + }, + }, ] -MIDDLEWARE_CLASSES = [ +MIDDLEWARE = [ 'django.middleware.common.CommonMiddleware', - #'django.contrib.sessions.middleware.SessionMiddleware', - #'django.middleware.csrf.CsrfViewMiddleware', - #'django.contrib.auth.middleware.AuthenticationMiddleware', - #'django.contrib.messages.middleware.MessageMiddleware', ] ROOT_URLCONF = 'turniej.urls' -TEMPLATE_DIRS = [ - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. - os.path.join(PROJECT_DIR, 'templates'), -] - -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.contrib.messages.context_processors.messages", - "django.core.context_processors.request", -) -TEMPLATE_CONTEXT_PROCESSORS += ( -) - INSTALLED_APPS = [ - #'django.contrib.auth', - #'django.contrib.contenttypes', - #'django.contrib.sessions', 'django.contrib.sites', - #'django.contrib.messages', 'django.contrib.staticfiles', - # 'django.contrib.admin', - # 'django.contrib.admindocs', - 'piwik', 'fnpdjango', @@ -143,29 +124,6 @@ INSTALLED_APPS = [ 'edition2', ] -# A sample logging configuration. The only tangible logging -# performed by this configuration is to send an email to -# the site admins on every HTTP 500 error. -# See http://docs.djangoproject.com/en/dev/topics/logging for -# more details on how to customize your logging configuration. -LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'handlers': { - 'mail_admins': { - 'level': 'ERROR', - 'class': 'django.utils.log.AdminEmailHandler' - } - }, - 'loggers': { - 'django.request': { - 'handlers': ['mail_admins'], - 'level': 'ERROR', - 'propagate': True, - }, - } -} - POETRY_POEMS_FOR_CONTEST = 20 ALLOWED_HOSTS = [