Move to Django 1.5, some styling changes.
[cas.git] / src / cas / settings.py
1 # -*- coding: utf-8 -*-
2 from os import path
3
4 PROJECT_ROOT = path.realpath(path.dirname(__file__))
5
6 DEBUG = True
7 TEMPLATE_DEBUG = DEBUG
8
9 ADMINS = [
10 ]
11
12 MANAGERS = ADMINS
13
14 DATABASES = {
15     'default': {
16         'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
17         'NAME': path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3.
18         'USER': '',                      # Not used with sqlite3.
19         'PASSWORD': '',                  # Not used with sqlite3.
20         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
21         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
22     }
23 }
24
25 # Local time zone for this installation. Choices can be found here:
26 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
27 # although not all choices may be available on all operating systems.
28 # If running in a Windows environment this must be set to the same as your
29 # system time zone.
30 TIME_ZONE = None
31
32 # Language code for this installation. All choices can be found here:
33 # http://www.i18nguy.com/unicode/language-identifiers.html
34 LANGUAGE_CODE = 'pl'
35
36 SITE_ID = 1
37
38 # If you set this to False, Django will make some optimizations so as not
39 # to load the internationalization machinery.
40 USE_I18N = True
41
42 # Absolute path to the directory that holds media.
43 # Example: "/home/media/media.lawrence.com/"
44 MEDIA_ROOT = PROJECT_ROOT + '/media/'
45
46 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
47 # trailing slash if there is a path component (optional in other cases).
48 # Examples: "http://media.lawrence.com", "http://example.com/media/"
49 MEDIA_URL = '/media/'
50
51 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
52 # trailing slash.
53 # Examples: "http://foo.com/media/", "/media/".
54 ADMIN_MEDIA_PREFIX = '/admin-media/'
55
56 ROOT_URLCONF = 'cas.urls'
57
58 TEMPLATE_DIRS = (
59     PROJECT_ROOT + '/templates',
60 )
61
62 INSTALLED_APPS = (
63     'django.contrib.auth',
64     'django.contrib.contenttypes',
65     'django.contrib.sessions',
66     'django.contrib.sites',
67     'django.contrib.admin',
68     'django.contrib.admindocs',
69
70     'cas_provider',
71     'gravatar',
72     'south',
73
74     'accounts',
75 )
76
77 # django-cas-provider settings
78 LOGIN_URL = '/cas/login/'
79 LOGOUT_URL = '/cas/logout/'
80 LOGIN_REDIRECT_URL = '/accounts/'
81 CAS_CUSTOM_ATTRIBUTES_CALLBACK = 'cas.utils.custom_attributes_callback'
82 SESSION_COOKIE_NAME = 'fnpcas'
83
84 GRAVATAR_DEFAULT_IMAGE = 'mm'
85
86 # Import localsettings file, which may override settings defined here
87 try:
88     from localsettings import *
89 except ImportError:
90     pass