Skip to content

Commit

Permalink
python2.5 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
digi604 committed Dec 17, 2012
1 parent c4eeead commit 679339a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cms/test_utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
DJANGO_1_3 = LooseVersion(django.get_version()) < LooseVersion('1.4')

def configure(db_url, **extra):
splits = db_url.split("://")
scheme = splits[0]
splits[0] = "http"
db_url = "://".join(splits)
db_splits = urlparse(db_url)
from django.conf import settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'cms.test_utils.cli'
if not 'DATABASES' in extra:
db_type = db_splits.scheme
db_type = scheme
if db_type == 'sqlite':
DB = {
'ENGINE': 'django.db.backends.sqlite3',
Expand Down

0 comments on commit 679339a

Please sign in to comment.