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