Changes between Initial Version and Version 1 of Ticket #27517


Ignore:
Timestamp:
Nov 21, 2016, 5:50:32 AM (8 years ago)
Author:
Kosei Kitahara
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27517 – Description

    initial v1  
    11When create class based view which contain `TemplateResponseMixin`,
    22
    3 ```
     3{{{
    44class MyTemplateView(TemplateResponseMixin, ContextMixin, View):
    55    def get(self, request, *args, **kwargs):
    66        context = self.get_context_data(**kwargs)
    77        return self.render_to_response(context, charset=kwargs.get('charset', 'utf-8'))
    8 ```
     8}}}
    99
    1010`TemplateResponseMixin.render_to_response` call `SimpleTemplateResponse. __init__` with a `charset` keyword argument.
Back to Top