django 1.3, comments on books, last activity log, some minor changes
[redakcja.git] / redakcja / settings / common.py
1 # -*- coding: utf-8 -*-
2 from __future__ import absolute_import
3 import os.path
4
5 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
6
7 DEBUG = False
8 TEMPLATE_DEBUG = DEBUG
9
10 MAINTENANCE_MODE = False
11
12 ADMINS = (
13     # (u'Marek Stępniowski', 'marek@stepniowski.com'),
14     # (u'Łukasz Rekucki', 'lrekucki@gmail.com'),
15     (u'Radek Czajka', 'radoslaw.czajka@nowoczesnapolska.org.pl'),
16 )
17
18 MANAGERS = ADMINS
19
20 # Local time zone for this installation. Choices can be found here:
21 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
22 # although not all choices may be available on all operating systems.
23 # If running in a Windows environment this must be set to the same as your
24 # system time zone.
25 TIME_ZONE = 'Europe/Warsaw'
26
27 # Language code for this installation. All choices can be found here:
28 # http://www.i18nguy.com/unicode/language-identifiers.html
29 LANGUAGE_CODE = 'pl'
30
31 #import locale
32 #locale.setlocale(locale.LC_ALL, '')
33
34 SITE_ID = 1
35
36 # If you set this to False, Django will make some optimizations so as not
37 # to load the internationalization machinery.
38 USE_I18N = True
39 USE_L10N = True
40
41
42 # Absolute path to the directory that holds media.
43 # Example: "/home/media/media.lawrence.com/"
44 MEDIA_ROOT = PROJECT_ROOT + '/media/dynamic'
45 STATIC_ROOT = PROJECT_ROOT + '/static/'
46
47 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
48 # trailing slash if there is a path component (optional in other cases).
49 # Examples: "http://media.lawrence.com", "http://example.com/media/"
50 MEDIA_URL = '/media/dynamic/'
51 STATIC_URL = '/media/static/'
52
53 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
54 # trailing slash.
55 # Examples: "http://foo.com/media/", "/media/".
56 ADMIN_MEDIA_PREFIX = '/media/admin-media/'
57
58 # Make this unique, and don't share it with anybody.
59 SECRET_KEY = 'ife@x^_lak+x84=lxtr!-ur$5g$+s6xt85gbbm@e_fk6q3r8=+'
60 SESSION_COOKIE_NAME = "redakcja_sessionid"
61
62 # List of callables that know how to import templates from various sources.
63 TEMPLATE_LOADERS = (
64     'django.template.loaders.filesystem.load_template_source',
65     'django.template.loaders.app_directories.load_template_source',
66 #     'django.template.loaders.eggs.load_template_source',
67 )
68
69 TEMPLATE_CONTEXT_PROCESSORS = (
70     "django.core.context_processors.auth",
71     "django.core.context_processors.debug",
72     "django.core.context_processors.i18n",
73     "redakcja.context_processors.settings", # this is instead of media
74     'django.core.context_processors.csrf',
75     "django.core.context_processors.request",
76 )
77
78
79 MIDDLEWARE_CLASSES = (
80     'django.middleware.common.CommonMiddleware',
81     'django.middleware.csrf.CsrfViewMiddleware',
82     'django.contrib.sessions.middleware.SessionMiddleware',
83
84     'django.contrib.auth.middleware.AuthenticationMiddleware',
85     'django_cas.middleware.CASMiddleware',
86
87     'django.middleware.doc.XViewMiddleware',
88     'pagination.middleware.PaginationMiddleware',
89     'maintenancemode.middleware.MaintenanceModeMiddleware',
90 )
91
92 AUTHENTICATION_BACKENDS = (
93     'django.contrib.auth.backends.ModelBackend',
94     'django_cas.backends.CASBackend',
95 )
96
97 ROOT_URLCONF = 'redakcja.urls'
98
99 TEMPLATE_DIRS = (
100     PROJECT_ROOT + '/templates',
101 )
102
103 FIREPYTHON_LOGGER_NAME = "fnp"
104
105 #
106 # Central Auth System
107 #
108 ## Set this to where the CAS server lives
109 # CAS_SERVER_URL = "http://cas.fnp.pl/
110 CAS_LOGOUT_COMPLETELY = True
111
112 INSTALLED_APPS = (
113     'django.contrib.auth',
114     'django.contrib.contenttypes',
115     'django.contrib.sessions',
116     'django.contrib.sites',
117     'django.contrib.admin',
118     'django.contrib.admindocs',
119     'django.contrib.comments',
120
121     'django_cas',
122     'compress',
123     'south',
124     'sorl.thumbnail',
125     'filebrowser',
126     'pagination',
127     'gravatar',
128
129     'dvcs',
130     'wiki',
131     'toolbar',
132     'apiclient',
133 )
134
135 FILEBROWSER_URL_FILEBROWSER_MEDIA = STATIC_URL + 'filebrowser/'
136 FILEBROWSER_DIRECTORY = 'images/'
137 FILEBROWSER_ADMIN_VERSIONS = []
138 FILEBROWSER_VERSIONS_BASEDIR = 'thumbnails/'
139 FILEBROWSER_DEFAULT_ORDER = "path_relative"
140
141 # REPOSITORY_PATH = '/Users/zuber/Projekty/platforma/files/books'
142 IMAGE_DIR = 'images'
143
144
145 WL_API_CONFIG = {
146     "URL": "http://localhost:7000/api/",
147     "AUTH_REALM": "WL API",
148     "AUTH_USER": "platforma",
149     "AUTH_PASSWD": "platforma",
150 }
151
152 SHOW_APP_VERSION = False
153
154 try:
155     from redakcja.settings.compress import *
156 except ImportError:
157     pass
158