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