Opened 10 years ago

Closed 9 years ago

#3034 closed enhancement (fixed)

Added "mimetype" param to django.views.generic.simple.direct_to_template

Reported by: Paul Bx <pb@…> Owned by: jacob
Component: Generic views Version: master
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I think direct_to_template is the only generic view that doesn't take a "mimetype" param. This patch remedies that. The use-case that drove me to write this was wanting robots.txt to have the right Content-Type. I'm sure there are others (CSS generation and JS generation come to mind).

I've tested this with a dummy project and via (though direct_to_template doesn't seem to be covered).

Attachments (1)

dtt_mimetype.diff (1.2 KB) - added by Paul Bx <pb@…> 10 years ago.
the patch

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Paul Bx <pb@…>

the patch

comment:1 Changed 9 years ago by Simon G. <dev@…>

  • Component changed from Template system to Generic views
  • Owner changed from adrian to jacob
  • Summary changed from [patch] Added "mimetype" param to django.views.generic.simple.direct_to_template to Added "mimetype" param to django.views.generic.simple.direct_to_template
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 9 years ago by mtredinnick

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

(In [4983]) Fixed #3034 -- Added mimetype parameter to the direct_to_template() generic
view, for consistency with the other generic views. Thanks, Paul Bx.

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