diff options
author | Mike Crute <mcrute@gmail.com> | 2015-07-29 18:33:04 -0700 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2015-07-29 18:33:04 -0700 |
commit | c29586b5ddf030ebc406aa7008ebfefc858a0af4 (patch) | |
tree | b4b3ba26bb2b4ceb25f122b7f39216816723f080 /greenbox | |
parent | 1b2bd5c3fd47515ca8e96b4dce1b9ca9b88b5cb1 (diff) | |
download | greenbox-master.tar.bz2 greenbox-master.tar.xz greenbox-master.zip |
Diffstat (limited to 'greenbox')
-rw-r--r-- | greenbox/settings.py | 23 | ||||
-rw-r--r-- | greenbox/urls.py | 6 | ||||
-rw-r--r-- | greenbox/wsgi.py | 32 |
3 files changed, 39 insertions, 22 deletions
diff --git a/greenbox/settings.py b/greenbox/settings.py index a0096ed..939f396 100644 --- a/greenbox/settings.py +++ b/greenbox/settings.py | |||
@@ -1,20 +1,12 @@ | |||
1 | import os | 1 | import os |
2 | 2 | ||
3 | PROJECT_DIR = os.path.dirname(__file__) | 3 | PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) |
4 | PUBLIC_DIR = os.path.join(PROJECT_DIR, 'site_media') | 4 | PUBLIC_DIR = os.path.join(os.path.dirname(__file__), 'site_media') |
5 | 5 | ||
6 | SITE_ID = 1 | 6 | SITE_ID = 1 |
7 | USE_I18N = False | 7 | USE_I18N = False |
8 | DEBUG = True | 8 | TEMPLATE_DEBUG = DEBUG = True |
9 | TEMPLATE_DEBUG = DEBUG | ||
10 | |||
11 | PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) | ||
12 | |||
13 | ADMINS = ( | ||
14 | ('Mike Crute', 'mcrute@gmail.com'), | ||
15 | ) | ||
16 | 9 | ||
17 | MANAGERS = ADMINS | ||
18 | 10 | ||
19 | DATABASES = { | 11 | DATABASES = { |
20 | 'default': { | 12 | 'default': { |
@@ -27,10 +19,6 @@ TIME_ZONE = 'America/New_York' | |||
27 | LANGUAGE_CODE = 'en-us' | 19 | LANGUAGE_CODE = 'en-us' |
28 | ROOT_URLCONF = 'greenbox.urls' | 20 | ROOT_URLCONF = 'greenbox.urls' |
29 | 21 | ||
30 | |||
31 | MEDIA_ROOT = os.path.join(PUBLIC_DIR, 'media') | ||
32 | MEDIA_URL = '/site_media/media/' | ||
33 | |||
34 | STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static') | 22 | STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static') |
35 | STATIC_URL = '/site_media/static/' | 23 | STATIC_URL = '/site_media/static/' |
36 | 24 | ||
@@ -60,8 +48,3 @@ INSTALLED_APPS = ( | |||
60 | 'south', | 48 | 'south', |
61 | 'recipe', | 49 | 'recipe', |
62 | ) | 50 | ) |
63 | |||
64 | try: | ||
65 | from settings_local import * | ||
66 | except ImportError: | ||
67 | pass | ||
diff --git a/greenbox/urls.py b/greenbox/urls.py index fb38894..1e6b755 100644 --- a/greenbox/urls.py +++ b/greenbox/urls.py | |||
@@ -1,5 +1,7 @@ | |||
1 | from django.conf.urls.defaults import patterns, include, url | 1 | from django.conf.urls import patterns, include, url |
2 | from django.contrib import admin; admin.autodiscover() | 2 | |
3 | from django.contrib import admin | ||
4 | admin.autodiscover() | ||
3 | 5 | ||
4 | urlpatterns = patterns('', | 6 | urlpatterns = patterns('', |
5 | url(r'^admin/', include(admin.site.urls)), | 7 | url(r'^admin/', include(admin.site.urls)), |
diff --git a/greenbox/wsgi.py b/greenbox/wsgi.py new file mode 100644 index 0000000..0e2d030 --- /dev/null +++ b/greenbox/wsgi.py | |||
@@ -0,0 +1,32 @@ | |||
1 | """ | ||
2 | WSGI config for imd project. | ||
3 | |||
4 | This module contains the WSGI application used by Django's development server | ||
5 | and any production WSGI deployments. It should expose a module-level variable | ||
6 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover | ||
7 | this application via the ``WSGI_APPLICATION`` setting. | ||
8 | |||
9 | Usually you will have the standard Django WSGI application here, but it also | ||
10 | might make sense to replace the whole Django WSGI application with a custom one | ||
11 | that later delegates to the Django one. For example, you could introduce WSGI | ||
12 | middleware here, or combine a Django application with an application of another | ||
13 | framework. | ||
14 | |||
15 | """ | ||
16 | import os | ||
17 | |||
18 | # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks | ||
19 | # if running multiple sites in the same mod_wsgi process. To fix this, use | ||
20 | # mod_wsgi daemon mode with each site in its own daemon process, or use | ||
21 | # os.environ["DJANGO_SETTINGS_MODULE"] = "imd.settings" | ||
22 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "greenbox.settings") | ||
23 | |||
24 | # This application object is used by any WSGI server configured to use this | ||
25 | # file. This includes Django's development server, if the WSGI_APPLICATION | ||
26 | # setting points here. | ||
27 | from django.core.wsgi import get_wsgi_application | ||
28 | application = get_wsgi_application() | ||
29 | |||
30 | # Apply WSGI middleware here. | ||
31 | # from helloworld.wsgi import HelloWorldApplication | ||
32 | # application = HelloWorldApplication(application) | ||