Clean up photos so that it does 404s
[sommitrealweird.git] / sommitrealweird / settings.py
1 # Django settings for sommitrealweird project.
2
3 # Rather than editing these here, add them to the localsettings.py file which
4 # will be included at the end of the run
5
6 import os
7
8 topdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
9
10 ADMINS = (
11     ('Brett Parker', 'iDunno@sommitrealweird.co.uk'),
12 )
13
14 ALLOWED_HOSTS = [
15     "www.sommitrealweird.co.uk",
16     "www.sommitrealweird.co.uk.",
17 ]
18
19 MANAGERS = ADMINS
20
21 DATABASES = {
22     'default': {
23             'ENGINE': 'django.db.backends.sqlite3',
24             'NAME': os.path.join(topdir, 'sommitrealweird.db')
25     }
26 }
27
28 TIME_ZONE = 'Europe/London'
29
30 LANGUAGE_CODE = 'en-gb'
31
32 SITE_ID = 1
33
34 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
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 MEDIA_ROOT = os.path.join(topdir, 'media') + os.sep
41 MEDIA_URL = '/media/'
42
43 STATIC_URL = '/static/'
44
45 import random
46 import string
47 key_chars = "%s%s%s" % (string.letters, string.digits, '+-()_#~')
48 SECRET_KEY = [random.choice(key_chars) for a in range(0,50)]
49
50 CACHES = {
51     'default': {
52         'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
53          'LOCATION': '%s/tmp' %(topdir),
54     }
55 }
56
57 TEMPLATE_LOADERS = (
58     'django.template.loaders.filesystem.Loader',
59     'django.template.loaders.app_directories.Loader',
60 )
61
62 MIDDLEWARE_CLASSES = (
63     'django.middleware.common.CommonMiddleware',
64     'django.contrib.sessions.middleware.SessionMiddleware',
65     'django.contrib.auth.middleware.AuthenticationMiddleware',
66     'django.contrib.messages.middleware.MessageMiddleware',
67     'django.middleware.csrf.CsrfViewMiddleware',
68     'django.contrib.admindocs.middleware.XViewMiddleware',
69 )
70
71 ROOT_URLCONF = 'urls'
72
73 TEMPLATE_DIRS = (
74     os.path.join(topdir, 'templates'),
75 )
76
77 INSTALLED_APPS = (
78     'django.contrib.auth',
79     'django.contrib.contenttypes',
80     'django.contrib.sessions',
81     'django.contrib.sites',
82     'django.contrib.admin',
83     'django.contrib.comments',
84     'bpcms',
85     'generic',
86     'blog',
87     'photo',
88 )
89
90 TEMPLATE_CONTEXT_PROCESSORS = (
91     'django.contrib.auth.context_processors.auth',
92     'django.core.context_processors.debug',
93     'django.core.context_processors.i18n',
94     'generic.context_processors.media',
95     'bpcms.context_processors.content_menu',
96     'bpcms.context_processors.content_submenu',
97     'bpcms.context_processors.content_breadcrumb',
98     'blog.context_processors.content_breadcrumb',
99     'blog.context_processors.blog_feed',
100     'photo.context_processors.content_breadcrumb',
101 )
102
103 APPEND_SLASH=False
104
105 RESTRUCTUREDTEXT_FILTER_SETTINGS = {
106     'initial_header_level': 2,
107     'doctitle_xform': False,
108 }
109
110 BPCMS_ROOT = '/'
111 BPCMS_DISALLOWED_ROOT_DOC_NAMES = (
112     'admin',
113     'blog',
114     'photos',
115 )
116
117 BLOG_ROOT = '/blog/'
118 BLOG_TITLE = u'The World of SommitRealWeird.'
119 BLOG_FEED_ROOT = '/feeds/blog/'
120
121 try:
122     from localsettings import *
123 except:
124     pass
125