mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
2FA: Support for adding TOTP-based devices
This commit is contained in:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user