2014-07-26 13:00:21 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
|
2014-07-27 19:46:43 +02:00
|
|
|
class BaseSiteView(TemplateView):
|
2014-07-26 13:00:21 +02:00
|
|
|
template_name = "base.html"
|
2014-07-27 19:46:43 +02:00
|
|
|
page_name = "Citavi Mapper"
|
|
|
|
page_title = "BASE"
|
2014-07-26 13:00:21 +02:00
|
|
|
|
|
|
|
def get(self, request, **kwargs):
|
|
|
|
self._request = request
|
2014-07-27 19:46:43 +02:00
|
|
|
return super(BaseSiteView, self).get(request, **kwargs)
|
2014-07-26 13:00:21 +02:00
|
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
2014-07-27 19:46:43 +02:00
|
|
|
context = super(BaseSiteView, self).get_context_data(**kwargs)
|
|
|
|
context['page_name'] = self.page_name
|
|
|
|
context['page_title'] = self.page_title
|
2014-07-26 13:00:21 +02:00
|
|
|
return context
|
2014-07-27 19:46:43 +02:00
|
|
|
|
|
|
|
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"
|