summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParth Buch2012-07-19 22:58:18 +0530
committerParth Buch2012-07-19 22:58:18 +0530
commitc77a1b78988fd3e8e92b52110ca14eb33f530e14 (patch)
treefc047e12e14e99eb7d16465a4ddd842b4f613255
parentbe07f320f872c9be90d9fbc53aba8fadadc35396 (diff)
downloadstproject-c77a1b78988fd3e8e92b52110ca14eb33f530e14.tar.gz
stproject-c77a1b78988fd3e8e92b52110ca14eb33f530e14.tar.bz2
stproject-c77a1b78988fd3e8e92b52110ca14eb33f530e14.zip
Added production.cfg file with postgresql settings and changed the setting files accordingly
-rw-r--r--production.cfg24
-rw-r--r--stapp/development.py11
-rw-r--r--stapp/production.py15
-rw-r--r--stapp/settings.py11
4 files changed, 49 insertions, 12 deletions
diff --git a/production.cfg b/production.cfg
new file mode 100644
index 0000000..cc4f4e7
--- /dev/null
+++ b/production.cfg
@@ -0,0 +1,24 @@
+[buildout]
+parts =
+ django
+eggs =
+ South
+ django-debug-toolbar
+ PIL
+ psycopg2
+
+versions = versions
+[versions]
+django = 1.3
+
+[django]
+recipe = djangorecipe
+project = stapp
+settings = production
+wsgi = true
+wsgilog=wsgi.log
+eggs =
+ ${buildout:eggs}
+extra-paths =
+ stapp
+
diff --git a/stapp/development.py b/stapp/development.py
index b865a6c..562c5b2 100644
--- a/stapp/development.py
+++ b/stapp/development.py
@@ -3,6 +3,17 @@ from stapp.settings import *
DEBUG=True
TEMPLATE_DEBUG=DEBUG
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'stapp.db', # Or path to database file if using sqlite3.
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
+
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
diff --git a/stapp/production.py b/stapp/production.py
index 238f678..f902bd6 100644
--- a/stapp/production.py
+++ b/stapp/production.py
@@ -1,2 +1,15 @@
-
from stapp.settings import *
+DEBUG=False
+TEMPLATE_DEBUG=DEBUG$
+
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'stapp', # Or path to database file if using sqlite3.
+ 'USER': 'stapp', # Not used with sqlite3.
+ 'PASSWORD': 'pp@ssw0rd', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
diff --git a/stapp/settings.py b/stapp/settings.py
index a688151..9534e14 100644
--- a/stapp/settings.py
+++ b/stapp/settings.py
@@ -9,17 +9,6 @@ ADMINS = (
MANAGERS = ADMINS
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'stapp.db', # Or path to database file if using sqlite3.
- 'USER': '', # Not used with sqlite3.
- 'PASSWORD': '', # Not used with sqlite3.
- 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '', # Set to empty string for default. Not used with sqlite3.
- }
-}
-
URL_ROOT = ''
# Local time zone for this installation. Choices can be found here: