assigning tickets, new ui
[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
40 # Absolute path to the directory that holds media.
41 # Example: "/home/media/media.lawrence.com/"
42 MEDIA_ROOT = PROJECT_ROOT + '/media/dynamic'
43 STATIC_ROOT = PROJECT_ROOT + '/static/'
44
45 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
46 # trailing slash if there is a path component (optional in other cases).
47 # Examples: "http://media.lawrence.com", "http://example.com/media/"
48 MEDIA_URL = '/media/dynamic/'
49 STATIC_URL = '/media/static/'
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 = '/media/admin-media/'
55
56 # Make this unique, and don't share it with anybody.
57 SECRET_KEY = 'ife@x^_lak+x84=lxtr!-ur$5g$+s6xt85gbbm@e_fk6q3r8=+'
58 SESSION_COOKIE_NAME = "redakcja_sessionid"
59
60 # List of callables that know how to import templates from various sources.
61 TEMPLATE_LOADERS = (
62     'django.template.loaders.filesystem.load_template_source',
63     'django.template.loaders.app_directories.load_template_source',
64 #     'django.template.loaders.eggs.load_template_source',
65 )
66
67 TEMPLATE_CONTEXT_PROCESSORS = (
68     "django.core.context_processors.auth",
69     "django.core.context_processors.debug",
70     "django.core.context_processors.i18n",
71     "redakcja.context_processors.settings", # this is instead of media
72     "django.core.context_processors.request",
73 )
74
75
76 MIDDLEWARE_CLASSES = (
77     'django.middleware.common.CommonMiddleware',
78     'django.contrib.sessions.middleware.SessionMiddleware',
79
80     'django.contrib.auth.middleware.AuthenticationMiddleware',
81     'django_cas.middleware.CASMiddleware',
82
83     'django.middleware.doc.XViewMiddleware',
84     'pagination.middleware.PaginationMiddleware',
85     'maintenancemode.middleware.MaintenanceModeMiddleware',
86 )
87
88 AUTHENTICATION_BACKENDS = (
89     'django.contrib.auth.backends.ModelBackend',
90     'django_cas.backends.CASBackend',
91 )
92
93 ROOT_URLCONF = 'redakcja.urls'
94
95 TEMPLATE_DIRS = (
96     PROJECT_ROOT + '/templates',
97 )
98
99 FIREPYTHON_LOGGER_NAME = "fnp"
100
101 #
102 # Central Auth System
103 #
104 ## Set this to where the CAS server lives
105 # CAS_SERVER_URL = "http://cas.fnp.pl/
106 CAS_LOGOUT_COMPLETELY = True
107
108 INSTALLED_APPS = (
109     'django.contrib.auth',
110     'django.contrib.contenttypes',
111     'django.contrib.sessions',
112     'django.contrib.sites',
113     'django.contrib.admin',
114     'django.contrib.admindocs',
115
116     'django_cas',
117     'compress',
118     'south',
119     'sorl.thumbnail',
120     'filebrowser',
121     'pagination',
122
123     'dvcs',
124     'wiki',
125     'toolbar',
126     'apiclient',
127 )
128
129 FILEBROWSER_URL_FILEBROWSER_MEDIA = STATIC_URL + 'filebrowser/'
130 FILEBROWSER_DIRECTORY = 'images/'
131 FILEBROWSER_ADMIN_VERSIONS = []
132 FILEBROWSER_VERSIONS_BASEDIR = 'thumbnails/'
133 FILEBROWSER_DEFAULT_ORDER = "path_relative"
134
135 # REPOSITORY_PATH = '/Users/zuber/Projekty/platforma/files/books'
136 IMAGE_DIR = 'images'
137
138
139 WL_API_CONFIG = {
140     "URL": "http://localhost:7000/api/",
141     "AUTH_REALM": "WL API",
142     "AUTH_USER": "platforma",
143     "AUTH_PASSWD": "platforma",
144 }
145
146 SHOW_APP_VERSION = False
147
148 try:
149     from redakcja.settings.compress import *
150 except ImportError:
151     pass
152