Monkey patch administration to use default login page, preventing login w/o 2FA

This commit is contained in:
Kumi 2019-03-08 09:27:14 +00:00
parent bcaad90cfd
commit 1c69a1ebaa

View file

@ -1,9 +1,13 @@
from django.contrib import admin
from django.urls import include, path
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from two_factor.urls import urlpatterns as tf_urls
from two_factor.gateways.twilio.urls import urlpatterns as tf_twilio_urls
admin.autodiscover()
admin.site.login = login_required(admin.site.login)
admin.site.site_header = 'VPN360 Network Administration'
admin.site.site_title = admin.site.site_header
admin.site.index_title = admin.site.site_title