Skip to content

Commit

Permalink
Merge 3cdaa6b into 4fb32e1
Browse files Browse the repository at this point in the history
  • Loading branch information
dmyerscough committed Apr 20, 2018
2 parents 4fb32e1 + 3cdaa6b commit 31424e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion django_mfa/templates/django_mfa/security.html
Expand Up @@ -24,7 +24,7 @@
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</span>
</p>
<a href="/settings/mfa/configure" class="btn btn-default">Enable MFA</a>
<a href="{% url 'mfa:configure_mfa' %}" class="btn btn-default">Enable MFA</a>
<p class="help">
<a href="https://help.github.com/articles/about-two-factor-authentication">Two-factor authentication</a> provides another layer of security to your account.
</p>
Expand Down
4 changes: 2 additions & 2 deletions django_mfa/tests.py
Expand Up @@ -15,11 +15,11 @@ def setUp(self):
user_login = self.client.login(username='micro', password="djangomfa")

def test_security_settings_view(self):
response = self.client.get(reverse('security_settings'))
response = self.client.get(reverse('mfa:security_settings'))
self.assertTemplateUsed(response, "django_mfa/security.html")

def test_configure_mfa_view(self):
response = self.client.get(reverse('configure_mfa'))
response = self.client.get(reverse('mfa:configure_mfa'))
self.assertTemplateUsed(response, "django_mfa/configure.html")

# def test_configure_mfa_post_view(self):
Expand Down
8 changes: 6 additions & 2 deletions django_mfa/urls.py
@@ -1,10 +1,14 @@
from django.conf.urls import url
from django.conf.urls import include, url
from .views import *

urlpatterns = [
security_patterns = ([
url(r'^security/$', security_settings, name="security_settings"),
url(r'^mfa/configure/$', configure_mfa, name="configure_mfa"),
url(r'^mfa/enable/$', enable_mfa, name="enable_mfa"),
url(r'^verify/token/$', verify_otp, name="verify_otp"),
url(r'^mfa/disable/$', disable_mfa, name="disable_mfa"),
], 'mfa')

urlpatterns = [
url(r'', include(security_patterns)),
]

0 comments on commit 31424e3

Please sign in to comment.