Opened 8 years ago

Last modified 8 years ago

#27517 closed Bug

TemplateResponseMixin with charset does not worked — at Initial Version

Reported by: Kosei Kitahara Owned by: nobody
Component: Generic views Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When create class based view which contain TemplateResponseMixin,

`
class MyTemplateView(TemplateResponseMixin, ContextMixin, View):

def get(self, request, *args, kwargs):

context = self.get_context_data(kwargs)
return self.render_to_response(context, charset=kwargs.get('charset', 'utf-8'))

`

TemplateResponseMixin.render_to_response call SimpleTemplateResponse. __init__ with a charset keyword argument.
But above method passed charset which is none-keyword argument.
Also content_type and status are same too.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top