niwinz / django-jinja

Simple and nonobstructive jinja2 integration with Django.
http://niwinz.github.io/django-jinja/latest/
BSD 3-Clause "New" or "Revised" License
363 stars 102 forks source link

TemplateDoesNotExist does not take keyword arguments #163

Closed gandriyko closed 8 years ago

gandriyko commented 8 years ago

Hi! I use Django 1.8 After update django-jinja from 1.4.2 to 2.1.1 Error appears:

  File "home/shop/lib/gutils/templates/gutils/item_list.html", line 27, in block "before_main"
    {{ view.form.as_ul() }}
  File "C:\Python27\lib\site-packages\django\forms\forms.py", line 293, in as_ul
    errors_on_separate_row=False)
  File "C:\Python27\lib\site-packages\django\forms\forms.py", line 241, in _html_output
    'field': six.text_type(bf),
  File "C:\Python27\lib\site-packages\django\utils\html.py", line 390, in <lambda>
    klass.__unicode__ = lambda self: mark_safe(klass_unicode(self))
  File "C:\Python27\lib\site-packages\django\forms\forms.py", line 537, in __str__
    return self.as_widget()
  File "C:\Python27\lib\site-packages\django\forms\forms.py", line 593, in as_widget
    return force_text(widget.render(name, self.value(), attrs=attrs))
  File "home/shop/lib/ajax_select/fields.py", line 101, in render
    out = render_to_string(templates, context)
  File "C:\Python27\lib\site-packages\django\template\loader.py", line 96, in render_to_string
    template = select_template(template_name, using=using)
  File "C:\Python27\lib\site-packages\django\template\loader.py", line 71, in select_template
    return engine.get_template(template_name)
  File "C:\Python27\lib\site-packages\django_jinja\backend.py", line 281, in get_template
    TemplateDoesNotExist(exc.name, backend=self),
TypeError: TemplateDoesNotExist does not take keyword arguments

Class TemplateDoesNotExist in old Django dos't take backend parameters.

niwinz commented 8 years ago

This will be fixed in the next version, see #161