X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/2d1d955bb3b4a5ca4dad1153c062c9ab3b6319e7..5c11ba52a0f81411f3b3a092e2547e3722a8ee59:/audiobooks/settings.py diff --git a/audiobooks/settings.py b/audiobooks/settings.py index 9f0731a..3f92da0 100644 --- a/audiobooks/settings.py +++ b/audiobooks/settings.py @@ -58,7 +58,7 @@ MEDIA_ROOT = os.path.join(PROJECT_ROOT, '../media') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" -MEDIA_URL = '' +MEDIA_URL = '/media/' # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files @@ -105,9 +105,15 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django_cas.middleware.CASMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) +AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'django_cas.backends.CASBackend', +) + ROOT_URLCONF = 'audiobooks.urls' TEMPLATE_DIRS = ( @@ -128,6 +134,9 @@ INSTALLED_APPS = ( # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', + 'djcelery', + 'djkombu', + 'south', 'archive', ) @@ -140,9 +149,15 @@ INSTALLED_APPS = ( LOGGING = { 'version': 1, 'disable_existing_loggers': False, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, 'handlers': { 'mail_admins': { 'level': 'ERROR', + 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler' } }, @@ -155,6 +170,26 @@ LOGGING = { } } +#http://logowanie.nowoczesnapolska.org.pl/cas/' +CAS_SERVER_URL = "http://logowanie.nowoczesnapolska.org.pl/cas/" +CAS_VERSION = "1" + + +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 = "/" try: