-
-
Notifications
You must be signed in to change notification settings - Fork 4
Move documentation from sphinx to mkdocs #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,8 @@ docs/_build/ | |
| # PyBuilder | ||
| target/ | ||
|
|
||
|
|
||
| # mkdocs documentation | ||
| /site/ | ||
|
|
||
| tests/local.py | ||
| docs/_build/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,112 @@ | ||||||
| <p align="center"> | ||||||
| <picture> | ||||||
| <source media="(prefers-color-scheme: dark)" srcset="https://github.com/codingjoe/django-mail-auth/raw/main/images/logo-dark.svg"> | ||||||
| <source media="(prefers-color-scheme: light)" srcset="https://github.com/codingjoe/django-mail-auth/raw/main/images/logo-light.svg"> | ||||||
| <img alt="Django MailAuth: Secure login links; no passwords required!" src="https://github.com/codingjoe/django-mail-auth/raw/main/images/logo-light.svg"> | ||||||
| </picture> | ||||||
| </p> | ||||||
|
|
||||||
| # Django Mail Auth | ||||||
|
|
||||||
| [](https://pypi.python.org/pypi/django-mail-auth/) | ||||||
| [](https://django-mail-auth.readthedocs.io/en/latest/?badge=latest) | ||||||
| [](https://codecov.io/gh/codingjoe/django-mail-auth) | ||||||
| [](https://raw.githubusercontent.com/codingjoe/django-mail-auth/main/LICENSE) | ||||||
|
|
||||||
| Django Mail Auth is a lightweight authentication backend for Django, | ||||||
| that does not require users to remember passwords. | ||||||
|
|
||||||
| Django Mail Auth features: | ||||||
|
|
||||||
| - custom user model support | ||||||
| - drop in Django admin support | ||||||
| - drop in Django User replacement | ||||||
| - drop in Wagtail login replacement | ||||||
| - extendable SMS support | ||||||
|
|
||||||
| {alt="screenshot from a login form" width="425px"} | ||||||
|
|
||||||
| This project was inspired by: | ||||||
|
|
||||||
| - [Is it time for password-less login?](http://notes.xoxco.com/post/27999787765/is-it-time-for-password-less-login) | ||||||
| by [Ben Brown](http://twitter.com/benbrown) | ||||||
| - [LOGIN WITHOUT PASSWORD MOST SECURE | WAIT.. WHAT?](https://www.lucius.digital/en/blog/login-without-password-most-secure-wait-what) | ||||||
| by [Joris Snoek](https://twitter.com/lucius_digital) | ||||||
| - [django-nopassword](https://github.com/relekang/django-nopassword) by | ||||||
| [Rolf Erik Lekang](http://rolflekang.com) | ||||||
|
|
||||||
| ## Installation | ||||||
|
|
||||||
| Run this command to install `django-mail-auth`: | ||||||
|
|
||||||
| ``` | ||||||
| python3 -m pip install django-mail-auth[wagtail] | ||||||
| ``` | ||||||
|
|
||||||
| ## Setup | ||||||
|
|
||||||
| First add `mailauth` to you installed apps: | ||||||
|
||||||
|
|
||||||
| ```python | ||||||
| INSTALLED_APPS = [ | ||||||
| # Django's builtin apps… | ||||||
| "mailauth", | ||||||
| "mailauth.contrib.admin", # optional | ||||||
| "mailauth.contrib.user", # optional | ||||||
| # optional, must be included before "wagtail.admin" | ||||||
| "mailauth.contrib.wagtail", | ||||||
| # other apps… | ||||||
| ] | ||||||
| ``` | ||||||
|
|
||||||
| `mailauth.contrib.admin` is optional and will replace the admin's login | ||||||
| with token based authentication too. | ||||||
|
|
||||||
| `mailauth.contrib.user` is optional and provides a new Django User | ||||||
| model. The new User model needs to be enabled via the `AUTH_USER_MODEL` | ||||||
| setting: | ||||||
|
|
||||||
| ```python | ||||||
| # This setting should be either "EmailUser" or | ||||||
| # any custom subclass of "AbstractEmailUser" | ||||||
| AUTH_USER_MODEL = "mailauth_user.EmailUser" | ||||||
|
|
||||||
| # optional, Wagtail only | ||||||
| WAGTAILUSERS_PASSWORD_ENABLED = False | ||||||
| ``` | ||||||
|
|
||||||
| Next you will need to add the new authentication backend: | ||||||
|
|
||||||
| ```python | ||||||
| AUTHENTICATION_BACKENDS = ( | ||||||
| # default, but now optional | ||||||
| # This should be removed if you use mailauth.contrib.user or any other | ||||||
| # custom user model that does not have a username/password | ||||||
| "django.contrib.auth.backends.ModelBackend", | ||||||
| # The new access token based authentication backend | ||||||
| "mailauth.backends.MailAuthBackend", | ||||||
| ) | ||||||
| ``` | ||||||
|
|
||||||
| Django's `ModelBackend` is only needed, if you still want to support | ||||||
| password based authentication. If you don't, simply remove it from the | ||||||
| list. | ||||||
|
|
||||||
| Last but not least, go to your URL root configuration `urls.py` and add | ||||||
| the following: | ||||||
|
|
||||||
| ```python | ||||||
| from django.urls import path | ||||||
|
||||||
| from django.urls import path | |
| from django.urls import path, include |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error: "setup you Email backend" should be "setup your Email backend".
| > Don't forget to setup you Email backend! | |
| > Don't forget to setup your Email backend! |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||
| # Contributing | ||||||
|
|
||||||
| To run test suite run: | ||||||
|
|
||||||
| ```console | ||||||
| uv run pytest | ||||||
| ``` | ||||||
|
|
||||||
| To build the documentation run: | ||||||
|
|
||||||
| ``` | ||||||
| uv run mkdocs serve | ||||||
| ``` | ||||||
|
|
||||||
| ## The sample app | ||||||
|
|
||||||
| To run a full example --- e.g. to debug frontend code -- you can run: | ||||||
|
||||||
| To run a full example --- e.g. to debug frontend code -- you can run: | |
| To run a full example - e.g. to debug frontend code - you can run: |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid URL protocol: "https://localhost:8000/admin/" should use "http://localhost:8000/admin/" since localhost typically runs on HTTP by default, not HTTPS.
| Next you can go to <https://localhost:8000/admin/> and log in with your | |
| Next you can go to <http://localhost:8000/admin/> and log in with your |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate dependency entry: "mdformat-ruff" is listed twice in the additional_dependencies list (lines 29 and line previously removed). This appears to be an error in the migration where line 29 should have been removed instead of line 28.