This commit is contained in:
2019-04-12 21:17:24 +02:00
commit 892ed029f6
45 changed files with 26292 additions and 0 deletions

16
base/views.py Normal file
View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import socket
from django.utils import timezone
from django.views import generic
class RootView(generic.TemplateView):
template_name = 'base/root.html'
def get_context_data(self, **kwargs):
if 'hostname' not in kwargs:
kwargs['hostname'] = socket.gethostname()
if 'time' not in kwargs:
kwargs['time'] = timezone.now()
return super(RootView, self).get_context_data(**kwargs)