X-Git-Url: https://git.mdrn.pl/turniej.git/blobdiff_plain/ca97ba2773578094c143d50e41af2dc2c267e600..479cb324a4cbc258f3f6de8de1025e7dccb1da2d:/turniej/settings.py diff --git a/turniej/settings.py b/turniej/settings.py index 97fa8da..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'), @@ -35,13 +33,13 @@ TIME_ZONE = None # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html -#LANGUAGE_CODE = 'pl' +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 +USE_I18N = True # If you set this to False, Django will not format dates, numbers and # calendars according to the current locale @@ -88,73 +86,52 @@ 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'), -] - INSTALLED_APPS = [ - #'django.contrib.auth', - #'django.contrib.contenttypes', - #'django.contrib.sessions', - #'django.contrib.sites', - #'django.contrib.messages', + 'django.contrib.sites', 'django.contrib.staticfiles', - # 'django.contrib.admin', - # 'django.contrib.admindocs', - - 'south', + 'piwik', + 'fnpdjango', 'poetry', + 'edition1', + '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 = [ + 'turniej.wolnelektury.pl', +] + # Load localsettings, if they exist try: - from localsettings import * + from .localsettings import * except ImportError: pass