views.generic.base.ContextMixin
  • References/Python/Django/API/Simple mixins

class django.views.generic.base.ContextMixin Methods

2025-01-10 15:47:30
views.generic.base.ContextMixin.get_context_data()
  • References/Python/Django/API/Simple mixins

get_context_data(**kwargs) Returns a dictionary representing the template context. The keyword arguments provided will make

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin
  • References/Python/Django/API/Simple mixins

class django.views.generic.base.TemplateResponseMixin Provides a mechanism to construct a

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin.template_name
  • References/Python/Django/API/Simple mixins

template_name The full name of a template to use as defined by a string. Not defining a template_name will raise

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin.content_type
  • References/Python/Django/API/Simple mixins

content_type The content type to use for the response. content_type is passed as a keyword argument to r

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin.template_engine
  • References/Python/Django/API/Simple mixins

template_engine The NAME of a template engine to use for loading the template. template_engine is

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin.render_to_response()
  • References/Python/Django/API/Simple mixins

render_to_response(context, **response_kwargs) Returns a self.response_class instance. If

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin.get_template_names()
  • References/Python/Django/API/Simple mixins

get_template_names() Returns a list of template names to search for when rendering the template. The first template that is

2025-01-10 15:47:30
views.generic.base.TemplateResponseMixin.response_class
  • References/Python/Django/API/Simple mixins

response_class The response class to be returned by render_to_response method. Default is

2025-01-10 15:47:30