· 7 years ago · Aug 27, 2018, 01:32 AM
1import os
2from djangoappengine.settings_base import *
3PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
4
5DEBUG = True
6TEMPLATE_DEBUG = DEBUG
7
8
9TIME_ZONE = 'Europe/Berlin'
10
11LANGUAGE_CODE = 'en-us'
12
13SITE_ID = 1
14
15# If you set this to False, Django will make some optimizations so as not
16# to load the internationalization machinery.
17USE_I18N = True
18
19# If you set this to False, Django will not format dates, numbers and
20# calendars according to the current locale
21USE_L10N = True
22
23
24MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
25MEDIA_URL = '/media/'
26
27ADMIN_MEDIA_PREFIX = '/media/admin/'
28
29# Make this unique, and don't share it with anybody.
30SECRET_KEY = 'hryv=(ol1$#&kywhw4d7c9j4z_e@jz2j+1hlqo93i735oqb1yg'
31
32# List of callables that know how to import templates from various sources.
33TEMPLATE_LOADERS = (
34 'django.template.loaders.filesystem.Loader',
35 'django.template.loaders.app_directories.Loader',
36# 'django.template.loaders.eggs.Loader',
37)
38
39MIDDLEWARE_CLASSES = (
40 'django.middleware.common.CommonMiddleware',
41 'django.contrib.sessions.middleware.SessionMiddleware',
42 'django.middleware.csrf.CsrfViewMiddleware',
43 'django.contrib.auth.middleware.AuthenticationMiddleware',
44 'django.contrib.messages.middleware.MessageMiddleware',
45)
46ROOT_URLCONF = 'urls'
47
48TEMPLATE_DIRS = (
49 os.path.join(PROJECT_PATH, 'templates')
50)
51TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'tv/templates'),)
52
53INSTALLED_APPS = (
54 'djangoappengine',
55 'django.contrib.auth',
56 'django.contrib.contenttypes',
57 'django.contrib.sessions',
58 'django.contrib.sites',
59 'django.contrib.messages',
60 'django.contrib.admin',
61 'djangotoolbox',
62 'dbindexer',
63 'tv',
64)
65
66
67try:
68 import dbindexer
69 DATABASES['native'] = DATABASES['default']
70 DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native'}
71 INSTALLED_APPS += ('dbindexer',)
72except ImportError:
73 pass