@@ -16,6 +16,7 @@ Django Mail Auth features:
1616- custom user model support
1717- drop in Django admin support
1818- drop in Django User replacement
19+ - drop in Wagtail login replacement
1920- extendable SMS support
2021
2122This project was inspired by:
@@ -43,22 +44,25 @@ Run this command to install ``django-mail-auth``::
4344Setup
4445-----
4546
46- First add `mailauth ` to you installed apps::
47+ First add `` mailauth ` ` to you installed apps::
4748
4849 INSTALLED_APPS = [
4950 # Django's builtin apps…
5051
5152 'mailauth',
5253 'mailauth.contrib.admin', # optional
5354 'mailauth.contrib.user', # optional
55+ # optional, must be included before "wagtail.admin"
56+ 'mailauth.contrib.wagtail',
57+
5458
5559 # other apps…
5660 ]
5761
58- `mailauth.contrib.admin ` is optional and will replace the admin's login
62+ `` mailauth.contrib.admin ` ` is optional and will replace the admin's login
5963with token based authentication too.
6064
61- `mailauth.contrib.user ` is optional and provides a new Django User model.
65+ `` mailauth.contrib.user ` ` is optional and provides a new Django User model.
6266The new User model needs to be enabled via the ``AUTH_USER_MODEL `` setting::
6367
6468 AUTH_USER_MODEL = 'mailauth_user.EmailUser'
@@ -75,16 +79,18 @@ Next you will need to add the new authentication backend::
7579 'mailauth.backends.MailAuthBackend',
7680 )
7781
78- Django's `ModelBackend ` is only needed, if you still want to support
82+ Django's `` ModelBackend ` ` is only needed, if you still want to support
7983password based authentication. If you don't, simply remove it from the list.
8084
81- Last but not least, go to your URL root config `urls.py ` and add the following::
85+ Last but not least, go to your URL root config `` urls.py ` ` and add the following::
8286
8387 from django.urls import path
8488
8589
8690 urlpatterns = [
8791 path('accounts/', include('mailauth.urls')),
92+ # optional, must be before "wagtail.admin.urls"
93+ path('', include('mailauth.contrib.wagtail.urls')),
8894 ]
8995
9096That's it!
0 commit comments