Source code for superdjango.views.templates

# Imports

from .base import BaseView

# Exports

__all__ = (
    "TemplateView",
)

# Views


[docs]class TemplateView(BaseView): """Render and display a template. .. tip:: ``template_name`` or ``get_template_names()`` must be defined. """ # noinspection PyUnusedLocal
[docs] def get(self, request, *args, **kwargs): """Render the page.""" # noinspection PyAttributeOutsideInit self.request = request context = self.get_context_data() return self.render_to_response(context)