Opened 18 years ago

Closed 18 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: dev
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

Description

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 runtests.py (though direct_to_template doesn't seem to be covered).

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

by Paul Bx <pb@…>, 18 years ago

Attachment: dtt_mimetype.diff added

the patch

comment:1 by Simon G. <dev@…>, 18 years ago

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 by Malcolm Tredinnick, 18 years ago

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