diff --git a/nsupdate/api/views.py b/nsupdate/api/views.py index 2ea1d70..95b2c76 100644 --- a/nsupdate/api/views.py +++ b/nsupdate/api/views.py @@ -191,7 +191,7 @@ def AuthorizedNicUpdateView(request): logger.info('%s - is not owned by user: %s' % (hostname, request.user.username, )) return Response('nohost') ipaddr = request.GET.get('myip') - if ipaddr is None: + if not ipaddr: ipaddr = request.META.get('REMOTE_ADDR') return _update(hostname, ipaddr) diff --git a/nsupdate/main/templates/main/host.html b/nsupdate/main/templates/main/host.html index 9df4508..173e5a7 100644 --- a/nsupdate/main/templates/main/host.html +++ b/nsupdate/main/templates/main/host.html @@ -4,9 +4,9 @@ {% block content %}
- +

{{ host.get_fqdn }}
back to overview

-

Edit Host back to overview

+

Edit Host

You can only change the comment. If you want to have another host name, you have to delete this host and create a new one.

{% csrf_token %} @@ -23,16 +23,24 @@

Update Nameserver Entry

-

Usually you configure your router to follow the dyndns2 protocol. But if you know what you are doing, and you want to update it by hand, you can do it here.

- - +

Usually you configure your router to follow the dyndns2 protocol. But if you know what you are doing, and you want to update it by hand, you can do it here.
If you don't specify an IP address, we use your remote address.

+
- +
- - - + +

Or use this url to set the ip via url:
Right Click → Copy Link Address