Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#15298 closed (fixed)

Nicer error message when TemplateResponseMixin not provided with a template_name

Reported by: rasca Owned by: nobody
Component: Generic views Version: master
Severity: Keywords: blocker
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When I call a view that inherits TemplateResponseMixin without a template_name defined I get

TemplateDoesNotExist at ´whatever url we called´
No exception supplied

We could improve this by explaining the error either in template.response.TemplateResponse or views.generic.base.TemplateResponseMixin

Change History (3)

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

In [15532]:

Fixed #15298 -- Raise a better error when a TemplateResponseMixin doesn't have a template_name defined. Thanks to rasca for the report.

comment:3 Changed 5 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top