diff options
Diffstat (limited to 'greenbox/settings.py')
-rw-r--r-- | greenbox/settings.py | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/greenbox/settings.py b/greenbox/settings.py index e6205e2..eb4f340 100644 --- a/greenbox/settings.py +++ b/greenbox/settings.py | |||
@@ -1,4 +1,7 @@ | |||
1 | import os.path | 1 | import os |
2 | |||
3 | PROJECT_DIR = os.path.dirname(__file__) | ||
4 | PUBLIC_DIR = os.path.join(PROJECT_DIR, 'site_media') | ||
2 | 5 | ||
3 | SITE_ID = 1 | 6 | SITE_ID = 1 |
4 | USE_I18N = False | 7 | USE_I18N = False |
@@ -13,30 +16,30 @@ ADMINS = ( | |||
13 | 16 | ||
14 | MANAGERS = ADMINS | 17 | MANAGERS = ADMINS |
15 | 18 | ||
16 | DATABASE_ENGINE = 'sqlite3' | 19 | DATABASES = { |
17 | DATABASE_NAME = '/srv/greenbox/greenbox.db' | 20 | 'default': { |
18 | #DATABASE_NAME = '/Users/mcrute/sandboxes/greenbox/src/greenbox.db' | 21 | 'ENGINE': 'django.db.backends.sqlite3', |
22 | 'NAME': '/home/crute_recipes/greenbox.db', | ||
23 | } | ||
24 | } | ||
19 | 25 | ||
20 | TIME_ZONE = 'America/New_York' | 26 | TIME_ZONE = 'America/New_York' |
21 | LANGUAGE_CODE = 'en-us' | 27 | LANGUAGE_CODE = 'en-us' |
22 | ROOT_URLCONF = 'greenbox.urls' | 28 | ROOT_URLCONF = 'greenbox.urls' |
23 | 29 | ||
24 | # Absolute path to the directory that holds media. | ||
25 | # Example: "/home/media/media.lawrence.com/" | ||
26 | MEDIA_ROOT = os.path.join(PROJECT_DIR, 'templates/media') | ||
27 | 30 | ||
28 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | 31 | MEDIA_ROOT = os.path.join(PUBLIC_DIR, 'media') |
29 | # trailing slash if there is a path component (optional in other cases). | 32 | MEDIA_URL = '/site_media/media/' |
30 | # Examples: "http://media.lawrence.com", "http://example.com/media/" | ||
31 | MEDIA_URL = '/media' | ||
32 | 33 | ||
33 | SECRET_KEY = 'zki4e4!80ar7^1w6f_c2u^5#=r(7#4%0u^3il^@__#3zf^u+f)' | 34 | STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static') |
35 | STATIC_URL = '/site_media/static/' | ||
34 | 36 | ||
35 | TEMPLATE_LOADERS = ( | 37 | STATICFILES_DIRS = ( |
36 | 'django.template.loaders.filesystem.load_template_source', | 38 | os.path.join(PROJECT_DIR, 'static'), |
37 | 'django.template.loaders.app_directories.load_template_source', | ||
38 | ) | 39 | ) |
39 | 40 | ||
41 | SECRET_KEY = 'zki4e4!80ar7^1w6f_c2u^5#=r(7#4%0u^3il^@__#3zf^u+f)' | ||
42 | |||
40 | MIDDLEWARE_CLASSES = ( | 43 | MIDDLEWARE_CLASSES = ( |
41 | 'django.middleware.common.CommonMiddleware', | 44 | 'django.middleware.common.CommonMiddleware', |
42 | 'django.contrib.sessions.middleware.SessionMiddleware', | 45 | 'django.contrib.sessions.middleware.SessionMiddleware', |
@@ -50,8 +53,9 @@ TEMPLATE_DIRS = ( | |||
50 | INSTALLED_APPS = ( | 53 | INSTALLED_APPS = ( |
51 | 'django.contrib.auth', | 54 | 'django.contrib.auth', |
52 | 'django.contrib.contenttypes', | 55 | 'django.contrib.contenttypes', |
56 | 'django.contrib.staticfiles', | ||
53 | 'django.contrib.sessions', | 57 | 'django.contrib.sessions', |
54 | 'django.contrib.sites', | 58 | 'django.contrib.sites', |
55 | 'django.contrib.admin', | 59 | 'django.contrib.admin', |
56 | 'greenbox.recipe', | 60 | 'recipe', |
57 | ) | 61 | ) |