We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fe3241 commit 1d7cf79Copy full SHA for 1d7cf79
django_tables2/tables.py
@@ -6,7 +6,6 @@
6
from django.utils.datastructures import SortedDict
7
from django.template import RequestContext
8
from django.template.loader import get_template
9
-from django.test.client import RequestFactory
10
from django.utils.encoding import StrAndUnicode
11
import itertools
12
import sys
@@ -277,6 +276,8 @@ def as_html(self):
277
276
generated will clobber the querystring of the request. Use the
278
``{% render_table %}`` template tag instead.
279
"""
+ # minimizes Django 1.3 dependency
280
+ from django.test.client import RequestFactory
281
request = RequestFactory().get('/')
282
template = get_template(self.template)
283
return template.render(RequestContext(request, {'table': self}))
0 commit comments