#19076: TemplateView does not support setting mime type, like views.generic.simple.direct_to_template did -------------------------------+-------------------- Reporter: gwahl@… | Owner: nobody Type: Uncategorized | Status: new Component: Generic views | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- I use `direct_to_template` to serve my robots.txt, like this:
{{{ urlpatterns = patterns('', url('^robots.txt$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')), ... }}} In Django 1.5 this is no longer possible, because the function-based generic views are removed, and TemplateView does not have a mime/content type argument. I think that a `content_type` argument should be added to TemplateView to add the same functionality that was in the function-based view. Patch to come. -- Ticket URL: <https://code.djangoproject.com/ticket/19076> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.