django-1.10-fix-settings-in-runtests.py.patch

This commit is contained in:
Thomas Goirand
2016-07-26 08:08:14 +00:00
parent 536afb3c6b
commit 5435fda95e
3 changed files with 52 additions and 0 deletions

2
debian/changelog vendored
View File

@@ -9,6 +9,8 @@ python-django-bootstrap-form (3.2.1-1) unstable; urgency=medium
[ Thomas Goirand ]
* New upstream release.
* Removed all patches.
* Added patch:
- django-1.10-fix-settings-in-runtests.py.patch
-- Thomas Goirand <zigo@debian.org> Mon, 18 Jul 2016 07:59:44 +0000

View File

@@ -0,0 +1,49 @@
Description: Fix settings in runtests.py
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2016-07-26
--- python-django-bootstrap-form-3.2.1.orig/runtests.py
+++ python-django-bootstrap-form-3.2.1/runtests.py
@@ -1,12 +1,13 @@
#!/usr/bin/env python
+import os
import sys
import django
from os.path import dirname, abspath
from django.conf import settings
-
+local_path = lambda path: os.path.join(os.path.dirname(__file__), path)
settings.configure(
DATABASES = {
@@ -34,6 +35,26 @@ settings.configure(
SITE_ID=1,
DEBUG=False,
ROOT_URLCONF='',
+
+ TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [local_path('templates'), ],
+ 'OPTIONS': {
+ 'debug': False,
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ 'loaders': [
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ ],
+ },
+ },
+]
)

1
debian/patches/series vendored Normal file
View File

@@ -0,0 +1 @@
django-1.10-fix-settings-in-runtests.py.patch