citavi_mapper/frontend/views.py

31 lines
847 B
Python

# -*- coding: utf-8 -*-
from django.views.generic import TemplateView
class BaseSiteView(TemplateView):
template_name = "base.html"
page_name = "Citavi Mapper"
page_title = "BASE"
def get(self, request, **kwargs):
self._request = request
return super(BaseSiteView, self).get(request, **kwargs)
def get_context_data(self, **kwargs):
context = super(BaseSiteView, self).get_context_data(**kwargs)
context['page_name'] = self.page_name
context['page_title'] = self.page_title
return context
class IndexView(BaseSiteView):
template_name = "index.html"
page_title = "Index"
class RegisterView(BaseSiteView):
template_name = "register.html"
page_title = "Register"
class LoginView(BaseSiteView):
template_name = "login.html"
page_title = "Login"