diff --git a/nsupdate/__init__.py b/nsupdate/__init__.py index a81932f..1f39d48 100644 --- a/nsupdate/__init__.py +++ b/nsupdate/__init__.py @@ -62,4 +62,4 @@ class Version(tuple): # pragma: no cover return version_str -version = Version(0, 13, 0) +version = Version(0, 12, 0) diff --git a/nsupdate/login/urls.py b/nsupdate/login/urls.py index 87ea866..9ecd129 100644 --- a/nsupdate/login/urls.py +++ b/nsupdate/login/urls.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- from django.conf.urls import url -from django.contrib.auth.views import login, logout_then_login, password_reset, password_reset_done, \ +from django.contrib.auth.views import login, logout, password_reset, password_reset_done, \ password_reset_confirm, password_reset_complete urlpatterns = ( # login and logout url url(r'^login/$', login, {'template_name': 'login.html'}, name='login'), # or use logout with template 'logout.html' - url(r'^logout/$', logout_then_login, name='logout'), + url(r'^logout/$', logout, name='logout'), # password reset urls url(r'^password_reset/$', password_reset, {'template_name': 'password_reset.html'}, diff --git a/nsupdate/management/commands/faults.py b/nsupdate/management/commands/faults.py index 2c581c1..40b0900 100644 --- a/nsupdate/management/commands/faults.py +++ b/nsupdate/management/commands/faults.py @@ -90,7 +90,7 @@ class Command(BaseCommand): dest='flag_abuse', default=None, type=int, - help='if client faults N then set abuse flag and reset client faults') + help='if client faults > N then set abuse flag and reset client faults') parser.add_argument('--notify-user', action='store_true', dest='notify_user', @@ -119,7 +119,7 @@ class Command(BaseCommand): output += u"%s %s\n" % (h.created_by.username, h.get_fqdn(),) self.stdout.write(output) if (flag_abuse is not None or reset_client or reset_server or - reset_available or reset_abuse or reset_abuse_blocked): + reset_available or reset_abuse or reset_abuse_blocked): if flag_abuse is not None: if h.client_faults > flag_abuse: h.abuse = True diff --git a/nsupdate/settings/base.py b/nsupdate/settings/base.py index 7bd159b..dcc2313 100644 --- a/nsupdate/settings/base.py +++ b/nsupdate/settings/base.py @@ -247,6 +247,7 @@ ACCOUNT_ACTIVATION_DAYS = 7 REGISTRATION_EMAIL_HTML = False # we override the text, but not the html email template LOGIN_REDIRECT_URL = '/overview/' +LOGOUT_REDIRECT_URL = '/' X_FRAME_OPTIONS = 'DENY' # for clickjacking middleware diff --git a/nsupdate/urls.py b/nsupdate/urls.py index e82f8bd..deb88b1 100644 --- a/nsupdate/urls.py +++ b/nsupdate/urls.py @@ -34,4 +34,4 @@ urlpatterns = [ if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) import debug_toolbar - urlpatterns += (url(r'^__debug__/', include(debug_toolbar.urls)),) + urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls)), ] diff --git a/setup.cfg b/setup.cfg index e3fc537..901b485 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,7 +21,7 @@ all_files = 1 [upload_sphinx] upload-dir = docs/_build/html -[tool:pytest] +[pytest] DJANGO_SETTINGS_MODULE = nsupdate.settings.dev pep8maxlinelength = 120 norecursedirs = .git diff --git a/setup.py b/setup.py index 31f192d..414dbd0 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,6 @@ setup for nsupdate package """ -import sys -PY2 = sys.version_info[0] == 2 - from setuptools import setup, find_packages from nsupdate import version