#19076: TemplateView does not support setting mime type, like
views.generic.simple.direct_to_template did
-------------------------------+------------------------------------
     Reporter:  gwahl@…        |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Generic views  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by aaugustin):

 Replying to [comment:6 bmispelon]:
 > Would it make sense to also add a `get_content_type` method (that would
 default to just returning `self.content_type`)?
 > A lot of the other generic views implement this pattern and it's useful
 in some cases.

 The accessor pattern is useful when views may have a good reason to
 incrementally modify the return value -- eg. the template context.

 I don't see an use case for `get_content_type`, and it can be added later
 on in a backwards-compatible way in the need arises.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19076#comment:10>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to