diff options
-rw-r--r-- | .hgignore | 4 | ||||
-rw-r--r-- | .hgrc | 1 | ||||
-rw-r--r-- | greenbox/manage.py | 11 | ||||
-rw-r--r-- | greenbox/settings.py | 36 | ||||
-rwxr-xr-x | manage.py | 10 |
5 files changed, 30 insertions, 32 deletions
diff --git a/.hgignore b/.hgignore deleted file mode 100644 index 5ab741f..0000000 --- a/.hgignore +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | syntax: glob | ||
2 | *.pyc | ||
3 | *.db | ||
4 | nohup.out | ||
@@ -1 +0,0 @@ | |||
1 | *.pyc | ||
diff --git a/greenbox/manage.py b/greenbox/manage.py deleted file mode 100644 index 5e78ea9..0000000 --- a/greenbox/manage.py +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | from django.core.management import execute_manager | ||
3 | try: | ||
4 | import settings # Assumed to be in the same directory. | ||
5 | except ImportError: | ||
6 | import sys | ||
7 | sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) | ||
8 | sys.exit(1) | ||
9 | |||
10 | if __name__ == "__main__": | ||
11 | execute_manager(settings) | ||
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 | ) |
diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..1845198 --- /dev/null +++ b/manage.py | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/usr/bin/env python | ||
2 | import os | ||
3 | import sys | ||
4 | |||
5 | if __name__ == "__main__": | ||
6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "greenbox.settings") | ||
7 | |||
8 | from django.core.management import execute_from_command_line | ||
9 | |||
10 | execute_from_command_line(sys.argv) | ||