From 374288d20a7618659b82b401d6774123bf2f72b6 Mon Sep 17 00:00:00 2001 From: Fabian Faessler Date: Sun, 29 Sep 2013 02:07:58 +0200 Subject: [PATCH] changed updateIp to detectIP --- nsupdate/api/views.py | 4 ++-- nsupdate/main/urls.py | 4 ++-- nsupdate/nsupdate/templates/base.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nsupdate/api/views.py b/nsupdate/api/views.py index 97c8962..e28f35f 100644 --- a/nsupdate/api/views.py +++ b/nsupdate/api/views.py @@ -6,8 +6,8 @@ logger = logging.getLogger(__name__) from django.http import HttpResponse from django.conf import settings from django.contrib.auth.hashers import check_password +from django.contrib.auth.decorators import login_required -from main.forms import * from main.models import Host import dns.inet import os @@ -19,7 +19,7 @@ def MyIpView(request): return HttpResponse(request.META['REMOTE_ADDR'], content_type="text/plain") -def UpdateIpView(request): +def DetectIpView(request): ipaddr = request.META['REMOTE_ADDR'] af = dns.inet.af_for_address(ipaddr) key = 'ipv4' if af == dns.inet.AF_INET else 'ipv6' diff --git a/nsupdate/main/urls.py b/nsupdate/main/urls.py index c5fd914..19ec1cf 100644 --- a/nsupdate/main/urls.py +++ b/nsupdate/main/urls.py @@ -3,7 +3,7 @@ from main.views import ( HomeView, OverviewView, HostView, DeleteHostView, ) from api.views import ( - MyIpView, UpdateIpView, NicUpdateView + MyIpView, DetectIpView, NicUpdateView ) urlpatterns = patterns('', @@ -12,6 +12,6 @@ urlpatterns = patterns('', url(r'^host/(?P\d+)/$', HostView.as_view(), name='host_view'), url(r'^host/(?P\d+)/delete/$', DeleteHostView.as_view(), name='delete_host'), url(r'^myip$', MyIpView), - url(r'^updateip$', UpdateIpView), + url(r'^detectip$', DetectIpView), url(r'^nic/update$', NicUpdateView), ) diff --git a/nsupdate/nsupdate/templates/base.html b/nsupdate/nsupdate/templates/base.html index f62b899..70c71c7 100644 --- a/nsupdate/nsupdate/templates/base.html +++ b/nsupdate/nsupdate/templates/base.html @@ -124,8 +124,8 @@
- - + +