Skip to content

Template rendering fails by default #126

Closed
@one4many

Description

@one4many

In backend.py you blindly do this: template = loader.get_template(self.template)
This fails per default with the current django_flilters package.
django_filters defines template as 'django_filters/rest_framework/form.html' (or 'django_filters/rest_framework/crispy_form.html' when crispy forms are installed) but does NOT ship the form.html file anywhere. Instead it has a fallback to a static form in it's own backend.py file.

try:
    template = loader.get_template(self.template)
except TemplateDoesNotExist:
    template = Template(template_default)'

You should do the same and import template_default from django_filters.rest_framework

Regards, Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions