public
Description: The Git repository for the Django, jQuery & Ajax tutorial series.
Homepage: http://lethain.com/entry/2008/sep/21/intro-to-unintrusive-javascript-with-django/
Clone URL: git://github.com/lethain/notes-djapp-tutorial.git
notes-djapp-tutorial / settings.py
100644 65 lines (49 sloc) 1.552 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Django settings for ajax_tut project.
import os
ROOT_PATH = os.path.dirname(__file__)
 
DEBUG = True
TEMPLATE_DEBUG = DEBUG
 
ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)
 
MANAGERS = ADMINS
 
## Changed
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
## Changed
DATABASE_NAME = os.path.join(ROOT_PATH, 'notes.sqlite')
 
TIME_ZONE = 'America/Chicago'
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
USE_I18N = True
 
## Changed
MEDIA_ROOT = os.path.join(ROOT_PATH, 'media')
 
## Changed
MEDIA_URL = 'http://127.0.0.1:8000/media/'
 
## Changed but irrelevant
ADMIN_MEDIA_PREFIX = '/admin_media/'
 
# Make this unique, and don't share it with anybody.
SECRET_KEY = '^yyde2(soo^!3@5l7outx*&yu-i-0bz+4sm)0#mr6fz1js9=t@'
 
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
 
LOGIN_REDIRECT_URL = "/"
 
MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
)
 
ROOT_URLCONF = 'ajax_tut.urls'
 
TEMPLATE_DIRS = (
    ## Changed
    os.path.join(ROOT_PATH, 'templates'),
)
 
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'notes',
)