File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
styleguide_example/blog_examples Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 54
54
]
55
55
56
56
INSTALLED_APPS = [
57
- # "django.contrib.admin",
58
- "styleguide_example.custom_admin.apps.CustomAdminConfig" ,
57
+ "django.contrib.admin" ,
58
+ # If you want to have required 2FA for the Django admin
59
+ # Uncomment the line below and comment out the default admin
60
+ # "styleguide_example.custom_admin.apps.CustomAdminConfig",
59
61
"django.contrib.auth" ,
60
62
"django.contrib.contenttypes" ,
61
63
"django.contrib.sessions" ,
Original file line number Diff line number Diff line change 6
6
7
7
@admin .register (UserTwoFactorAuthData )
8
8
class UserTwoFactorAuthDataAdmin (admin .ModelAdmin ):
9
+ """
10
+ This admin is for example purposes and ease of development and debugging.
11
+ Leaving this admin in production is a security risk.
12
+
13
+ Please refer to the following blog post for more information:
14
+ https://hacksoft.io/blog/adding-required-two-factor-authentication-2fa-to-the-django-admin
15
+ """
16
+
9
17
def qr_code (self , obj ):
10
18
return format_html (obj .generate_qr_code ())
11
19
You can’t perform that action at this time.
0 commit comments