[Python-modules-commits] [django-nose] 11/14: Remove unnecessary dependency on dj_database_url.
Michael Fladischer
fladi at moszumanska.debian.org
Fri Oct 16 16:43:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to annotated tag debian/1.4.2-1
in repository django-nose.
commit 2790fc210342b770f5aad012f0d445d4087da926
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.
---
testapp/settings.py | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/testapp/settings.py b/testapp/settings.py
index d204545..9059560 100644
--- a/testapp/settings.py
+++ b/testapp/settings.py
@@ -11,19 +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