Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# Imports 

2 

3from .base import BaseView 

4 

5# Exports 

6 

7__all__ = ( 

8 "TemplateView", 

9) 

10 

11# Views 

12 

13 

14class TemplateView(BaseView): 

15 """Render and display a template. 

16 

17 .. tip:: 

18 ``template_name`` or ``get_template_names()`` must be defined. 

19 

20 """ 

21 

22 # noinspection PyUnusedLocal 

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

24 """Render the page.""" 

25 # noinspection PyAttributeOutsideInit 

26 self.request = request 

27 

28 context = self.get_context_data() 

29 return self.render_to_response(context)