diff --git a/docs/admin.rst b/docs/admin.rst
index 9e43d3b..df979bf 100644
--- a/docs/admin.rst
+++ b/docs/admin.rst
@@ -216,6 +216,29 @@ Note: it is advised that you keep local customizations to a minimum as if you
override builtin templates with your customized copies, you will have to keep
your copies in sync with future changes we make to the builtin ones.
+Custom templates
+----------------
+
+If you need to add some simple views, just showing some simple templates (like
+e.g. if you have some footer links that link to these views to show some site-
+specific content, some legalese, ...), do it like that:
+
+* have a footer and a custom template directory like described in previous
+ section
+* add files like main/custom/foo.html to that directory::
+
+ {% extends "base.html" %}
+ {% load bootstrap %}
+ {% block content %}
+ This is content rendered from template "foo.html".
+ {% endblock %}
+
+* link to the view made from that template like this::
+
+
+ link to custom foo.html view
+
+
Maintenance
===========
diff --git a/nsupdate/main/urls.py b/nsupdate/main/urls.py
index 87c1569..ade4206 100644
--- a/nsupdate/main/urls.py
+++ b/nsupdate/main/urls.py
@@ -8,7 +8,7 @@ from django.views.generic import TemplateView
from .views import (
HomeView, OverviewView, HostView, DeleteHostView, AboutView, GenerateSecretView, GenerateNSSecretView,
RobotsTxtView, DomainOverviewView, DomainView, DeleteDomainView, StatusView, JsUpdateView,
- UpdaterHostConfigOverviewView, UpdaterHostConfigView, DeleteUpdaterHostConfigView)
+ UpdaterHostConfigOverviewView, UpdaterHostConfigView, DeleteUpdaterHostConfigView, CustomTemplateView)
from ..api.views import (
myip_view, DetectIpView, AjaxGetIps, NicUpdateView, AuthorizedNicUpdateView,
NicDeleteView, AuthorizedNicDeleteView)
@@ -19,6 +19,7 @@ urlpatterns = patterns(
# interactive web ui
url(r'^$', HomeView.as_view(), name="home"),
url(r'^about/$', AboutView.as_view(), name="about"),
+ url(r'^custom/(?P[\w.]+)$', CustomTemplateView.as_view(), name="custom"),
url(r'^update$', JsUpdateView.as_view(), name='update'),
url(r'^overview/$', OverviewView.as_view(), name='overview'),
url(r'^host/(?P\d+)/$', HostView.as_view(), name='host_view'),
diff --git a/nsupdate/main/views.py b/nsupdate/main/views.py
index eea6deb..6c8cd78 100644
--- a/nsupdate/main/views.py
+++ b/nsupdate/main/views.py
@@ -80,6 +80,14 @@ class AboutView(TemplateView):
return context
+class CustomTemplateView(TemplateView):
+ # template_name is set in dispatch method
+
+ def dispatch(self, *args, **kwargs):
+ self.template_name = 'main/custom/%s' % kwargs.get('template')
+ return super(CustomTemplateView, self).dispatch(*args, **kwargs)
+
+
class HomeView(TemplateView):
template_name = "main/home.html"