diff --git a/nsupdate/main/templates/main/overview.html b/nsupdate/main/templates/main/overview.html new file mode 100644 index 0000000..8e7e3f5 --- /dev/null +++ b/nsupdate/main/templates/main/overview.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block content %} + + + +

Overview

+

+ Ajax request to retrieve the ipv4/ipv6 remote address. The URL www.*.nsupdate.info is used for the call, so this will fail for the dev server. TODO: dev environment +

+ IPv4:
+ IPv6: +{% endblock %} \ No newline at end of file diff --git a/nsupdate/main/urls.py b/nsupdate/main/urls.py index d50c085..2222b69 100644 --- a/nsupdate/main/urls.py +++ b/nsupdate/main/urls.py @@ -1,7 +1,8 @@ from django.conf.urls import patterns, include, url -from main.views import HomeView, MyIpView +from main.views import HomeView, MyIpView, OverviewView urlpatterns = patterns('', url(r'^$', HomeView.as_view(), name="home"), + url(r'^overview/', OverviewView.as_view(), name="overview"), url(r'^myip/', MyIpView) ) diff --git a/nsupdate/main/views.py b/nsupdate/main/views.py index 506a129..a651baa 100644 --- a/nsupdate/main/views.py +++ b/nsupdate/main/views.py @@ -11,5 +11,14 @@ class HomeView(TemplateView): context['nav_home'] = True return context +class OverviewView(TemplateView): + template_name = "main/overview.html" + + def get_context_data(self, *args, **kwargs): + context = super(OverviewView, self).get_context_data(*args, **kwargs) + context['nav_overview'] = True + return context + + def MyIpView(request): - return HttpResponse(json.dumps({'ip':request.META['REMOTE_ADDR']}), content_type="application/json") \ No newline at end of file + return HttpResponse(json.dumps({'ip':request.META['REMOTE_ADDR']}), content_type="application/json") \ No newline at end of file diff --git a/nsupdate/nsupdate/settings.py b/nsupdate/nsupdate/settings.py index 190604e..367df29 100644 --- a/nsupdate/nsupdate/settings.py +++ b/nsupdate/nsupdate/settings.py @@ -124,6 +124,8 @@ INSTALLED_APPS = ( 'south', 'nsupdate', 'main', + 'bootstrapform', + 'registration', ) # A sample logging configuration. The only tangible logging @@ -154,3 +156,10 @@ LOGGING = { }, } } + +ACCOUNT_ACTIVATION_DAYS = 7 + +try: + from .local_settings import * +except ImportError: + pass diff --git a/nsupdate/nsupdate/static/css/nsupdate.css b/nsupdate/nsupdate/static/css/nsupdate.css index 3108276..f151011 100644 --- a/nsupdate/nsupdate/static/css/nsupdate.css +++ b/nsupdate/nsupdate/static/css/nsupdate.css @@ -1,3 +1,3 @@ .content { - margin-top: 40px; + margin-top: 70px; } diff --git a/nsupdate/nsupdate/templates/base.html b/nsupdate/nsupdate/templates/base.html index 2140bb8..4e10175 100644 --- a/nsupdate/nsupdate/templates/base.html +++ b/nsupdate/nsupdate/templates/base.html @@ -11,6 +11,7 @@ + @@ -27,6 +28,7 @@