[Python-modules-commits] [django-nose] 02/04: Remove unnecessary dependency on dj_database_url.

Michael Fladischer fladi at moszumanska.debian.org
Tue Oct 17 18:21:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch patch-queue/debian/master
in repository django-nose.

commit 51b6e94cb904e0487bda16a5fa7ffa4e479163f0
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri Oct 16 12:26:16 2015 +0200

    Remove unnecessary dependency on dj_database_url.
    
    Importing dj_database_url for a simple test application is not necessary,
    replace the static database configuration with a defautl one from Django.
    
    Gbp-Pq: Name 0002-Remove-unnecessary-dependency-on-dj_database_url.patch
---
 testapp/settings.py | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/testapp/settings.py b/testapp/settings.py
index a803307..1f23cdd 100644
--- a/testapp/settings.py
+++ b/testapp/settings.py
@@ -11,20 +11,13 @@ NOSE_PLUGINS - Comma-separated list of plugins to add
 from __future__ import print_function
 from os import environ, path
 
-import dj_database_url
-
 BASE_DIR = path.dirname(path.dirname(__file__))
 
-
-def rel_path(*subpaths):
-    """Construct the full path given a relative path."""
-    return path.join(BASE_DIR, *subpaths)
-
-
 DATABASES = {
-    'default':
-        dj_database_url.config(
-            default='sqlite:///' + rel_path('testapp.sqlite3'))
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': path.join(BASE_DIR, 'testapp.sqlite3'),
+    }
 }
 
 MIDDLEWARE_CLASSES = ()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-nose.git



More information about the Python-modules-commits mailing list