84c9b901a730d2d6074e6f04d6a923df6dfea13c
[eatslugs.git] / eatslugs / settings.py
1 # Django settings for eatslugs project.
2
3 # Rather than editing settings here, add them to the localsettings.py file
4 # which will be included at the end of the run and replace anything in here.
5
6 import os
7 topdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
8
9 DEBUG = True
10 TEMPLATE_DEBUG = DEBUG
11
12 ADMINS = (
13     ('Brett Parker', 'iDunno@sommitrealweird.co.uk'),
14 )
15
16 MANAGERS = ADMINS
17
18 DATABASES = {
19     'default': {
20             'ENGINE': 'django.db.backends.sqlite3',
21             'NAME': os.path.join(topdir, 'eatslugs.db')
22     }
23 }
24
25 TIME_ZONE = 'Europe/London'
26
27 LANGUAGE_CODE = 'en-gb'
28
29 SITE_ID = 1
30
31 # If you set this to False, Django will make some optimizations so as not
32 # to load the internationalization machinery.
33 USE_I18N = True
34
35 MEDIA_ROOT = os.path.join(topdir, 'media') + os.sep
36 MEDIA_URL = '/media/'
37
38 ADMIN_MEDIA_PREFIX = '/admin-media/'
39
40 import random
41 import string
42 key_chars = "%s%s%s" %(string.letters, string.digits, '+-()_#~')
43 SECRET_KEY = "".join([random.choice(key_chars) for a in range(0,50)])
44
45 MIDDLEWARE_CLASSES = (
46     'django.middleware.common.CommonMiddleware',
47     'django.contrib.sessions.middleware.SessionMiddleware',
48     'django.contrib.auth.middleware.AuthenticationMiddleware',
49 )
50
51 ROOT_URLCONF = 'urls'
52
53 INSTALLED_APPS = (
54     'django.contrib.admin',
55     'django.contrib.auth',
56     'django.contrib.contenttypes',
57     'django.contrib.sessions',
58     'django.contrib.sites',
59     'recipes',
60 )
61
62 TEMPLATES = [
63     {
64         'BACKEND': 'django.template.backends.django.DjangoTemplates',
65         'DIRS': [os.path.join(topdir, 'templates'),],
66         'APP_DIRS': True,
67         'OPTIONS': {
68             'context_processors': [
69                 'django.contrib.auth.context_processors.auth',
70                 'django.core.context_processors.debug',
71                 'django.core.context_processors.i18n',
72                 'generic.context_processors.media',
73             ],
74             'debug': True,
75         },
76     },
77 ]
78
79
80 try:
81     from localsettings import *
82 except:
83     pass
84