Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 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:

Description

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

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by russellm

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

comment:2 Changed 3 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 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.