Permalink
Browse files

Fixes configuration to enable appengine deployment

  • Loading branch information...
1 parent 212f294 commit 27efe5622e0238fed8cb45da3d31678ea9116862 @deleted deleted committed Jun 28, 2012
Showing with 20 additions and 6 deletions.
  1. +3 −0 app.yaml
  2. +16 −5 siteSettings.py
  3. +1 −1 submodules/geocamMapSet
View
@@ -19,6 +19,9 @@ libraries:
- name: django
version: "1.3"
+- name: PIL
+ version: "latest"
+
handlers:
- url: /static
View
@@ -41,12 +41,23 @@
MANAGERS = ADMINS
# Databases
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': 'dev.db'
+if (os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine') or os.getenv('SETTINGS_MODE','') == 'appengine'):
+ # Running on production App Engine, so use a Google Cloud SQL database.
+ # e.g.: SETTINGS_MODE=appengine ./manage.py syncdb
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'google.appengine.ext.django.backends.rdbms',
+ 'INSTANCE': 'geopub-db:geopub', # the cloud sql "instance name"
+ 'NAME': 'respondermaps', # the name of the database
+ }
+ }
+else:
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': 'dev.db'
+ }
}
-}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name

0 comments on commit 27efe56

Please sign in to comment.