diff options
author | Rune Halvorsen <runefh@gmail.com> | 2009-03-17 12:30:13 +0100 |
---|---|---|
committer | Rune Halvorsen <runefh@gmail.com> | 2009-03-17 12:30:13 +0100 |
commit | 138934fdd0cb7384fa94686bc844872ec31af21f (patch) | |
tree | c84a3ef3d686f5a5efc7bc537e878db5a1d32e5a | |
parent | cbc7295f2ee4b1a6a4c491d8690e1f213abd57fb (diff) | |
download | chishop-138934fdd0cb7384fa94686bc844872ec31af21f.tar.bz2 chishop-138934fdd0cb7384fa94686bc844872ec31af21f.tar.xz chishop-138934fdd0cb7384fa94686bc844872ec31af21f.zip |
Added buildout.cfg and moved dev stuff into separate settings file
-rw-r--r-- | buildout.cfg | 11 | ||||
-rw-r--r-- | chishop/development.py | 23 | ||||
-rw-r--r-- | chishop/settings.py | 32 |
3 files changed, 41 insertions, 25 deletions
diff --git a/buildout.cfg b/buildout.cfg new file mode 100644 index 0000000..925ed6a --- /dev/null +++ b/buildout.cfg | |||
@@ -0,0 +1,11 @@ | |||
1 | [buildout] | ||
2 | parts = django | ||
3 | eggs = | ||
4 | |||
5 | [django] | ||
6 | recipe = djangorecipe | ||
7 | version = 1.0.2 | ||
8 | settings = development | ||
9 | eggs = ${buildout:eggs} | ||
10 | project = chishop | ||
11 | wsgi = true \ No newline at end of file | ||
diff --git a/chishop/development.py b/chishop/development.py new file mode 100644 index 0000000..e333438 --- /dev/null +++ b/chishop/development.py | |||
@@ -0,0 +1,23 @@ | |||
1 | from settings import * | ||
2 | |||
3 | DEBUG = True | ||
4 | TEMPLATE_DEBUG = DEBUG | ||
5 | LOCAL_DEVELOPMENT = True | ||
6 | |||
7 | if LOCAL_DEVELOPMENT: | ||
8 | import os | ||
9 | import sys | ||
10 | sys.path.append(os.path.dirname(__file__)) | ||
11 | |||
12 | ADMINS = ( | ||
13 | ('chishop', 'example@example.org'), | ||
14 | ) | ||
15 | |||
16 | MANAGERS = ADMINS | ||
17 | |||
18 | DATABASE_ENGINE = 'sqlite3' | ||
19 | DATABASE_NAME = os.path.join(here, 'devdatabase.db') | ||
20 | DATABASE_USER = '' | ||
21 | DATABASE_PASSWORD = '' | ||
22 | DATABASE_HOST = '' | ||
23 | DATABASE_PORT = '' | ||
diff --git a/chishop/settings.py b/chishop/settings.py index 2ff0103..4abd490 100644 --- a/chishop/settings.py +++ b/chishop/settings.py | |||
@@ -1,38 +1,19 @@ | |||
1 | # Django settings for djangopypi project. | 1 | # Django settings for djangopypi project. |
2 | import os | 2 | import os |
3 | 3 | ||
4 | # #### | ||
5 | # This are the settings you're most likely to change | ||
6 | # when running the chishop servber. | ||
7 | |||
8 | # If this is true errors will have informative error pages. | ||
9 | DEBUG = True | ||
10 | |||
11 | ADMINS = ( | 4 | ADMINS = ( |
12 | # ('Your Name', 'your_email@domain.com'), | 5 | # ('Your Name', 'your_email@domain.com'), |
13 | ) | 6 | ) |
14 | 7 | ||
15 | # Absolute path to the directory that holds media. | 8 | MANAGERS = ADMINS |
16 | # Example: "/home/media/media.lawrence.com/" | ||
17 | # Uploaded python distributions will be saved in the | ||
18 | # dists/ directory under this path. | ||
19 | here = os.path.abspath(os.path.dirname(__file__)) | ||
20 | MEDIA_ROOT = os.path.join(here, 'media') | ||
21 | |||
22 | |||
23 | # Database settings. | ||
24 | 9 | ||
25 | DATABASE_ENGINE = 'sqlite3' # or mysql | 10 | DATABASE_ENGINE = '' |
26 | DATABASE_NAME = 'devdatabase.db' | 11 | DATABASE_NAME = '' |
27 | DATABASE_USER = '' | 12 | DATABASE_USER = '' |
28 | DATABASE_PASSWORD = '' | 13 | DATABASE_PASSWORD = '' |
29 | DATABASE_HOST = '' | 14 | DATABASE_HOST = '' |
30 | DATABASE_PORT = '' | 15 | DATABASE_PORT = '' |
31 | 16 | ||
32 | |||
33 | # ###### --- settings below here, are probably not that important ---- ##### | ||
34 | |||
35 | |||
36 | # Local time zone for this installation. Choices can be found here: | 17 | # Local time zone for this installation. Choices can be found here: |
37 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | 18 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
38 | # although not all choices may be available on all operating systems. | 19 | # although not all choices may be available on all operating systems. |
@@ -44,15 +25,16 @@ TIME_ZONE = 'America/Chicago' | |||
44 | # http://www.i18nguy.com/unicode/language-identifiers.html | 25 | # http://www.i18nguy.com/unicode/language-identifiers.html |
45 | LANGUAGE_CODE = 'en-us' | 26 | LANGUAGE_CODE = 'en-us' |
46 | 27 | ||
47 | MANAGERS = ADMINS | ||
48 | TEMPLATE_DEBUG = DEBUG | ||
49 | LOCAL_DEVELOPMENT = DEBUG | ||
50 | SITE_ID = 1 | 28 | SITE_ID = 1 |
51 | 29 | ||
52 | # If you set this to False, Django will make some optimizations so as not | 30 | # If you set this to False, Django will make some optimizations so as not |
53 | # to load the internationalization machinery. | 31 | # to load the internationalization machinery. |
54 | USE_I18N = True | 32 | USE_I18N = True |
55 | 33 | ||
34 | # Absolute path to the directory that holds media. | ||
35 | # Example: "/home/media/media.lawrence.com/" | ||
36 | here = os.path.abspath(os.path.dirname(__file__)) | ||
37 | MEDIA_ROOT = os.path.join(here, 'media') | ||
56 | 38 | ||
57 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | 39 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
58 | # trailing slash if there is a path component (optional in other cases). | 40 | # trailing slash if there is a path component (optional in other cases). |