X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/2c9debf2812dfbd4ff59348559ae57cd49858e8b..0dd89aae9312bb35ea3398bc9cbf4312ac8d5003:/src/cas/settings.py?ds=sidebyside diff --git a/src/cas/settings.py b/src/cas/settings.py index 21a4a35..0c8ec90 100644 --- a/src/cas/settings.py +++ b/src/cas/settings.py @@ -41,17 +41,19 @@ USE_I18N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = PROJECT_ROOT + '/media/' +MEDIA_ROOT = path.join(PROJECT_ROOT, '../../media/') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/admin-media/' +STATIC_ROOT = path.join(PROJECT_ROOT, '../../static/') +STATIC_URL = '/static/' + +STATICFILES_DIRS = [ + path.join(PROJECT_ROOT, 'static'), +] ROOT_URLCONF = 'cas.urls' @@ -59,6 +61,10 @@ TEMPLATE_DIRS = ( PROJECT_ROOT + '/templates', ) +LOCALE_PATHS = ( + PROJECT_ROOT + '/locale', +) + INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', @@ -66,14 +72,26 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', + 'django.contrib.staticfiles', 'cas_provider', - 'gravatar', + 'django_gravatar', 'south', 'accounts', ) +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", +) + # django-cas-provider settings LOGIN_URL = '/cas/login/' LOGOUT_URL = '/cas/logout/' @@ -82,6 +100,7 @@ CAS_CUSTOM_ATTRIBUTES_CALLBACK = 'cas.utils.custom_attributes_callback' SESSION_COOKIE_NAME = 'fnpcas' GRAVATAR_DEFAULT_IMAGE = 'mm' +GRAVATAR_URL_PREFIX = 'https://www.gravatar.com/' # Import localsettings file, which may override settings defined here try: