X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/eee35e00bf0d0eb3d2a9f08f72c7052962fecbf6..87b88f4b3401e02b42ae96d7aaf99ba016571c0b:/src/audiobooks/settings.py diff --git a/src/audiobooks/settings.py b/src/audiobooks/settings.py index 6ec4fe7..ca3d16e 100644 --- a/src/audiobooks/settings.py +++ b/src/audiobooks/settings.py @@ -1,5 +1,4 @@ # Django settings for audiobooks project. -# -*- coding: utf-8 -*- import os PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) @@ -7,7 +6,6 @@ PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) DEBUG = False -TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), @@ -17,12 +15,8 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': os.path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'audio', } } @@ -91,35 +85,37 @@ STATICFILES_FINDERS = ( # Make this unique, and don't share it with anybody. SECRET_KEY = '8ehk^-+pr(o)k6lh_gl9+ks6gkd9u#fka7fv%ikpk(c%llqa6%' -# 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, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django_cas.middleware.CASMiddleware', + 'django_cas_ng.middleware.CASMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', - 'django_cas.backends.CASBackend', + 'django_cas_ng.backends.CASBackend', ) ROOT_URLCONF = 'audiobooks.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. -) - INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', @@ -127,16 +123,15 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', - # Uncomment the next line to enable the admin: 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', + 'bootstrap4', + 'django_cas_ng', - 'djcelery', - 'djkombu', - - 'south', + 'apiclient', 'archive', + 'youtube', ) # A sample logging configuration. The only tangible logging @@ -168,29 +163,17 @@ LOGGING = { } } -#http://logowanie.nowoczesnapolska.org.pl/cas/' -CAS_SERVER_URL = "http://logowanie.nowoczesnapolska.org.pl/cas/" -CAS_VERSION = "1" - +CAS_SERVER_URL = "https://logowanie.nowoczesnapolska.org.pl/cas/" +CAS_VERSION = "2" EMAIL_SUBJECT_PREFIX = '[Audio] ' SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 -import djcelery -djcelery.setup_loader() - -CELERY_SEND_TASK_ERROR_EMAILS = True -BROKER_BACKEND = "djkombu.transport.DatabaseTransport" -BROKER_HOST = "localhost" -BROKER_PORT = 5672 -BROKER_USER = "guest" -BROKER_PASSWORD = "guest" -BROKER_VHOST = "/" - +CELERY_BROKER_URL = 'redis://localhost:6379/0' try: - from localsettings import * + from .localsettings import * except: pass