Merge branch 'master' of github.com:asmaps/nsupdate.info

This commit is contained in:
Arne Schauf 2013-09-29 22:07:49 +02:00
commit c159d08131
4 changed files with 19 additions and 18 deletions

View File

@ -4,42 +4,39 @@
{% block content %}
<div class="row" style="background-color: #DDDDDD">
<div class="col-sm-4" style="text-align: center">
<h1><i class="icon-globe icon-4x"></i></h1>
<h1><i class="icon-globe icon-3x"></i></h1>
<h3>World Wide Web</h3>
<p>
nsupdate.info is a free and <a href="https://github.com/asmaps/nsupdate.info">open-source</a> dynamic DNS service with IPv4 and IPv6 support.
nsupdate.info is a <a href="https://github.com/asmaps/nsupdate.info">free and open-source</a> dynamic DNS service with IPv4 and IPv6 support.
</p>
</div>
<div class="col-sm-4" style="text-align: center">
<h1><i class="icon-cogs icon-4x"></i></h1>
<h1><i class="icon-cogs icon-3x"></i></h1>
<h3>Awesomeness</h3>
<p>
Powered by python, the magical django pony and a stupid three columned icon landing page.
Powered by Python, the magical Django Pony and a stupid three columned icon landing page.
</p>
</div>
<div class="col-sm-4" style="text-align: center">
<h1><i class="icon-trophy icon-4x"></i></h1>
<h3>The Throphy Is A Lie</h3>
<h1><i class="icon-trophy icon-3x"></i></h1>
<h3>The Trophy Is A Lie</h3>
<p>
nsupdate.info is winner of the <a href="http://djangodash.com">Django-Dash</a> 2013 with the highest score in the history of the competition.
nsupdate.info is winner of the <a href="http://djangodash.com/">Django-Dash</a> 2013 with the highest score in the history of the competition.
</p>
</div>
</div>
<hr>
<div class="row">
<div class="container">
<h1>HeyHo!</h1>
{% if request.session.ipv4 and request.session.ipv6 %}
<p>We think this are your IPs:</p>
{% elif request.session.ipv4 or request.session.ipv6 %}
<p>We think this is your IP:</p>
{% endif %}
<div class="container">
{% if request.session.ipv4 %}
<h1>{{request.session.ipv4}}</h1>
<h1>Your IPv4 address: {{request.session.ipv4}}</h1>
{% else %}
<h1>Your IPv4 address: unknown</h1>
{% endif %}
{% if request.session.ipv6 %}
<h1>{{request.session.ipv6}}</h1>
<h1>Your IPv6 address: {{request.session.ipv6}}</h1>
{% else %}
<h1>Your IPv6 address: unknown</h1>
{% endif %}
</div>
</div>

View File

@ -24,6 +24,7 @@
<div class="col-lg-4">
<h3>Update Nameserver Entry</h3>
<p>Usually you configure your router to follow the dyndns protocol. But if you know what you are doing, and you want to update it by hand, you can do it here.</p>
<form method="get" action="{% url 'nic_update_authorized' %}">
<input type="hidden" name="hostname" value="{{ host.get_fqdn }}">
<div class="form-group">
@ -32,6 +33,8 @@
</div>
<button type="submit" class="btn btn-primary">DNS Update</button>
</form>
<p>Or use this url, for example as a bookmark: <br><a href="{% url 'nic_update_authorized' %}?hostname={{ host.get_fqdn }}&myip={{ remote_addr }}">Right Click &rarr; Copy Link Address</a></p>
</div>
</div>
<hr>

View File

@ -10,7 +10,7 @@
{% for host in hosts %}
<tr>
<td><b>{{ host.subdomain }}.{{ host.domain.domain }}</b></td>
<td>{{ host.last_update|timesince }}</td>
<td>{{ host.last_api_update|timesince }}</td>
<td>{{ host.getIPv4 }}</td>
<td>{{ host.getIPv6 }}</td>
<td>{{ host.comment }}</td>

View File

@ -127,6 +127,7 @@ class HostView(UpdateView):
def get_context_data(self, *args, **kwargs):
context = super(HostView, self).get_context_data(*args, **kwargs)
context['nav_overview'] = True
context['remote_addr'] = self.request.META['REMOTE_ADDR']
context['hosts'] = Host.objects.filter(created_by=self.request.user)
return context