2FA: Support for adding TOTP-based devices

This commit is contained in:
Raphael Michel
2016-10-08 14:11:59 +02:00
parent 508a4f8e86
commit 2f24af824e
18 changed files with 290 additions and 17 deletions

View File

@@ -1,9 +1,8 @@
from django.core.urlresolvers import resolve, reverse
from django.dispatch import receiver
from django.template.loader import get_template
from django.utils.translation import ugettext_lazy as _
from pretix.control.signals import html_head, nav_event
from pretix.control.signals import nav_event
@receiver(nav_event, dispatch_uid="pretixdroid_nav")
@@ -22,13 +21,3 @@ def control_nav_import(sender, request=None, **kwargs):
'icon': 'android',
}
]
@receiver(html_head, dispatch_uid="pretixdroid_html_head")
def html_head_presale(sender, request=None, **kwargs):
url = resolve(request.path_info)
if url.namespace == 'plugins:pretixdroid':
template = get_template('pretixplugins/pretixdroid/control_head.html')
return template.render({})
else:
return ""