Opened 12 years ago

Closed 12 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: no UI/UX: no


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@…> 12 years ago.
the patch

Download all attachments as: .zip

Change History (3)

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

Attachment: dtt_mimetype.diff added

the patch

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

Component: Template systemGeneric views
Owner: changed from Adrian Holovaty to Jacob
Summary: [patch] Added "mimetype" param to django.views.generic.simple.direct_to_templateAdded "mimetype" param to django.views.generic.simple.direct_to_template
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 12 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(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