about page

This commit is contained in:
Arne Schauf 2013-09-29 17:06:39 +02:00
parent edc888419d
commit cb53af87e7
4 changed files with 46 additions and 6 deletions

View File

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% load bootstrap %}
{% block content %}
<h1>About nsupdate.info</h1>
<p>nsupdate.info is the idea of a really simple single purpose dynamic dns
service. Unlike other dynamic dns services its intention is that you do not
have to click a link every 30 days to keep your domain enabled or other
jokes like this.</p>
<h2>Features</h2>
<div class="well">
<i class="icon icon-ok"></i> Open-Source<br>
<i class="icon icon-ok"></i> Free<br>
<i class="icon icon-ok"></i> Easy<br>
<i class="icon icon-ok"></i> Fast<br>
<i class="icon icon-ok"></i> Awesome<br>
<i class="icon icon-ok"></i> Made with love<br>
</div>
{% endblock %}

View File

@ -1,17 +1,22 @@
from django.conf.urls import patterns, url from django.conf.urls import patterns, url
from main.views import HomeView, OverviewView, HostView, DeleteHostView from main.views import (
from api.views import MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView HomeView, OverviewView, HostView, DeleteHostView, AboutView)
from api.views import (
MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView)
urlpatterns = patterns( urlpatterns = patterns(
'', '',
url(r'^$', HomeView.as_view(), name="home"), url(r'^$', HomeView.as_view(), name="home"),
url(r'^about/$', AboutView.as_view(), name="about"),
url(r'^overview/$', OverviewView.as_view(), name='overview'), url(r'^overview/$', OverviewView.as_view(), name='overview'),
url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'), url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'),
url(r'^host/(?P<pk>\d+)/delete/$', DeleteHostView.as_view(), name='delete_host'), url(r'^host/(?P<pk>\d+)/delete/$',
DeleteHostView.as_view(), name='delete_host'),
url(r'^myip$', MyIpView), url(r'^myip$', MyIpView),
url(r'^detectip/$', DetectIpView), url(r'^detectip/$', DetectIpView),
url(r'^detectip/(?P<secret>\w+)/$', DetectIpView), url(r'^detectip/(?P<secret>\w+)/$', DetectIpView),
url(r'^nic/update$', NicUpdateView), url(r'^nic/update$', NicUpdateView),
url(r'^nic/update_authorized$', AuthorizedNicUpdateView, name='nic_update_authorized'), url(r'^nic/update_authorized$',
AuthorizedNicUpdateView, name='nic_update_authorized'),
) )

View File

@ -14,6 +14,15 @@ from main.forms import HostForm
from main.models import Host from main.models import Host
class AboutView(TemplateView):
template_name = "main/about.html"
def get_context_data(self, *args, **kwargs):
context = super(AboutView, self).get_context_data(*args, **kwargs)
context['nav_about'] = True
return context
class HomeView(TemplateView): class HomeView(TemplateView):
template_name = "main/home.html" template_name = "main/home.html"

View File

@ -29,8 +29,15 @@
</div> </div>
<div class="collapse navbar-collapse"> <div class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li{% if nav_home %} class="active"{% endif %}><a href="{% url 'home' %}">Home</a></li> <li{% if nav_home %} class="active"{% endif %}>
<li{% if nav_overview %} class="active"{% endif %}><a href="{% url 'overview' %}">Overview</a></li> <a href="{% url 'home' %}">Home</a>
</li>
<li{% if nav_overview %} class="active"{% endif %}>
<a href="{% url 'overview' %}">Overview</a>
</li>
<li{% if nav_about %} class="active"{% endif %}>
<a href="{% url 'about' %}">About</a>
</li>
</ul> </ul>
<ul class="nav navbar-nav pull-right"> <ul class="nav navbar-nav pull-right">
{% if not request.user.is_authenticated %} {% if not request.user.is_authenticated %}