commit
783940d4cd
|
@ -1,5 +1,5 @@
|
|||
[bumpversion]
|
||||
current_version = 0.15.1
|
||||
current_version = 0.15.2
|
||||
commit = False
|
||||
tag = False
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
|
||||
Version 0.15.2 (2016-09-29)
|
||||
---------------------------
|
||||
|
||||
* #507 Fix compatibility issue when not using the DTL
|
||||
|
||||
|
||||
Version 0.15.1 (2016-09-28)
|
||||
---------------------------
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import absolute_import
|
|||
from .filterset import FilterSet
|
||||
from .filters import *
|
||||
|
||||
__version__ = '0.15.1'
|
||||
__version__ = '0.15.2'
|
||||
|
||||
|
||||
def parse_version(version):
|
||||
|
|
|
@ -30,11 +30,11 @@ FILTER_TEMPLATE = """
|
|||
|
||||
if compat.is_crispy:
|
||||
template_path = 'django_filters/rest_framework/crispy_form.html'
|
||||
template_default = Template(CRISPY_TEMPLATE)
|
||||
template_default = CRISPY_TEMPLATE
|
||||
|
||||
else:
|
||||
template_path = 'django_filters/rest_framework/form.html'
|
||||
template_default = Template(FILTER_TEMPLATE)
|
||||
template_default = FILTER_TEMPLATE
|
||||
|
||||
|
||||
class DjangoFilterBackend(BaseFilterBackend):
|
||||
|
@ -84,7 +84,7 @@ class DjangoFilterBackend(BaseFilterBackend):
|
|||
try:
|
||||
template = loader.get_template(self.template)
|
||||
except TemplateDoesNotExist:
|
||||
template = template_default
|
||||
template = Template(template_default)
|
||||
|
||||
return template_render(template, context={
|
||||
'filter': filter_instance
|
||||
|
|
|
@ -48,9 +48,9 @@ copyright = u'2013, Alex Gaynor and others.'
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.15.1'
|
||||
version = '0.15.2'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.15.1'
|
||||
release = '0.15.2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
2
setup.py
2
setup.py
|
@ -6,7 +6,7 @@ f = open('README.rst')
|
|||
readme = f.read()
|
||||
f.close()
|
||||
|
||||
version = '0.15.1'
|
||||
version = '0.15.2'
|
||||
|
||||
if sys.argv[-1] == 'publish':
|
||||
if os.system("pip freeze | grep wheel"):
|
||||
|
|
|
@ -19,6 +19,7 @@ from rest_framework.test import APIRequestFactory
|
|||
|
||||
from django_filters import filters
|
||||
from django_filters.rest_framework import DjangoFilterBackend, FilterSet
|
||||
from django_filters.rest_framework import backends
|
||||
|
||||
from .models import BaseFilterableItem, BasicModel, FilterableItem, DjangoFilterOrderingModel
|
||||
|
||||
|
@ -327,6 +328,17 @@ class IntegrationTestFiltering(CommonFilteringTestCase):
|
|||
|
||||
self.assertHTMLEqual(html, "Test")
|
||||
|
||||
@override_settings(TEMPLATES=[])
|
||||
def test_DTL_missing(self):
|
||||
# The backend should be importable even if the DTL is not used.
|
||||
# See: https://github.com/carltongibson/django-filter/issues/506
|
||||
try:
|
||||
from importlib import reload # python 3.4
|
||||
except ImportError:
|
||||
from imp import reload
|
||||
|
||||
reload(backends)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='tests.rest_framework.test_backends')
|
||||
class IntegrationTestDetailFiltering(CommonFilteringTestCase):
|
||||
|
|
Loading…
Reference in New Issue