Skip to content
This repository has been archived by the owner on Feb 18, 2019. It is now read-only.

Commit

Permalink
Use dj-database-url for database settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
oremj committed Dec 21, 2012
1 parent 97b3139 commit 66ea9ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions requirements.txt
@@ -1,6 +1,7 @@
#celery==2.5.1
#celery-tasktree==0.3.2
#django-celery==2.2.4
dj-database-url==0.2.1
django-extensions==0.9
django-multidb-router==0.5
django-nose==1.1
Expand Down
26 changes: 11 additions & 15 deletions sites/dev/settings.py
@@ -1,23 +1,19 @@
import dj_database_url

import private
from gelato.admin.settings import *

HOSTNAME='marketplace-admin-dev.allizom.org'
DOMAIN=HOSTNAME
HOSTNAME = 'marketplace-admin-dev.allizom.org'
DOMAIN = HOSTNAME
SITE_URL = 'http://%s' % DOMAIN
STATIC_URL = SITE_URL

DATABASES = {
'default': {
'ENGINE': 'mysql_pymysql',
'NAME': private.DATABASES_DEFAULT_NAME,
'HOST': private.DATABASES_DEFAULT_HOST,
'PORT': private.DATABASES_DEFAULT_PORT,
'USER': private.DATABASES_DEFAULT_USER,
'PASSWORD': private.DATABASES_DEFAULT_PASSWORD,
'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},
'TEST_CHARSET': 'utf8',
'TEST_COLLATION': 'utf8_general_ci',
},
}
DATABASES = {'default': dj_database_url.parse(private.DATABASES_DEFAULT_URL)}
DATABASES.update({
'ENGINE': 'mysql_pymysql',
'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},
'TEST_CHARSET': 'utf8',
'TEST_COLLATION': 'utf8_general_ci',
})

SESSION_COOKIE_DOMAIN = ".%s" % HOSTNAME

0 comments on commit 66ea9ae

Please sign in to comment.