move title string to context data method

remotes/origin/HEAD
Max Yakovenko 8 years ago
parent b3fd11f19a
commit f88f5c856e
  1. 8
      index/views.py

@ -1,5 +1,13 @@
from django.views.generic import TemplateView from django.views.generic import TemplateView
from django.utils.translation import ugettext_lazy as _
class IndexView(TemplateView): class IndexView(TemplateView):
template_name = 'index/index.html' template_name = 'index/index.html'
title = _('Русские программы')
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['title'] = self.title
return context

Loading…
Cancel
Save