error reporting
[redakcja.git] / apps / forms_builder / example_project / settings.py
1 from __future__ import absolute_import, unicode_literals
2
3 import os, sys
4
5
6 DEBUG = True
7 SITE_ID = 1
8 PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
9 PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
10 STATIC_URL = "/static/"
11 STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))
12 MEDIA_URL = STATIC_URL + "media/"
13 MEDIA_ROOT = os.path.join(PROJECT_ROOT, *MEDIA_URL.strip("/").split("/"))
14 ADMIN_MEDIA_PREFIX = STATIC_URL + "admin/"
15 ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME
16 TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),)
17 SECRET_KEY = "asdfa4wtW#$Gse4aGdfs"
18 ADMINS = ()
19
20
21 MANAGERS = ADMINS
22 if "test" not in sys.argv:
23     LOGIN_URL = "/admin/"
24
25 DATABASES = {
26     'default': {
27         'ENGINE': 'django.db.backends.sqlite3',
28         'NAME': 'dev.db',
29     }
30 }
31
32 TEMPLATE_LOADERS = (
33     'django.template.loaders.filesystem.Loader',
34     'django.template.loaders.app_directories.Loader',
35 )
36
37 MIDDLEWARE_CLASSES = (
38     'django.middleware.common.CommonMiddleware',
39     'django.contrib.sessions.middleware.SessionMiddleware',
40     'django.middleware.csrf.CsrfViewMiddleware',
41     'django.contrib.auth.middleware.AuthenticationMiddleware',
42     'django.contrib.messages.middleware.MessageMiddleware',
43 )
44
45 TEMPLATE_CONTEXT_PROCESSORS = (
46     "django.contrib.auth.context_processors.auth",
47     "django.contrib.messages.context_processors.messages",
48     "django.core.context_processors.debug",
49     "django.core.context_processors.i18n",
50     "django.core.context_processors.static",
51     "django.core.context_processors.media",
52     "django.core.context_processors.request",
53 )
54
55 INSTALLED_APPS = (
56     'django.contrib.admin',
57     'django.contrib.auth',
58     'django.contrib.contenttypes',
59     'django.contrib.sessions',
60     'django.contrib.sites',
61     'django.contrib.staticfiles',
62     'forms_builder.forms',
63 )
64
65 from django import VERSION
66 if VERSION < (1, 7):
67     try:
68         import south
69     except ImportError:
70         pass
71     else:
72         INSTALLED_APPS += ("south",)
73
74 FORMS_BUILDER_EXTRA_FIELDS = (
75     (100, "django.forms.BooleanField", "My cool checkbox"),
76 )
77
78 try:
79     from local_settings import *
80 except ImportError:
81     pass
82
83 TEMPLATE_DEBUG = DEBUG