Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a297c4f

Browse files
Cleanup code blocks and branch names in docs
1 parent b618eb9 commit a297c4f

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

‎README.rst‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ Run this command to install ``django-mail-auth``::
4343
Setup
4444
-----
4545

46-
First add ``mailauth`` to you installed apps::
46+
First add ``mailauth`` to you installed apps:
47+
48+
.. code-block:: python
4749
4850
INSTALLED_APPS = [
4951
# Django's builtin apps...
@@ -64,7 +66,9 @@ First add ``mailauth`` to you installed apps::
6466
with token based authentication too.
6567

6668
``mailauth.contrib.user`` is optional and provides a new Django User model.
67-
The new User model needs to be enabled via the ``AUTH_USER_MODEL`` setting::
69+
The new User model needs to be enabled via the ``AUTH_USER_MODEL`` setting:
70+
71+
.. code-block:: python
6872
6973
# This setting should be either "EmailUser" or
7074
# any custom subclass of "AbstractEmailUser"
@@ -74,7 +78,9 @@ The new User model needs to be enabled via the ``AUTH_USER_MODEL`` setting::
7478
WAGTAILUSERS_PASSWORD_ENABLED = False
7579
7680
77-
Next you will need to add the new authentication backend::
81+
Next you will need to add the new authentication backend:
82+
83+
.. code-block:: python
7884
7985
AUTHENTICATION_BACKENDS = (
8086
# default, but now optional
@@ -89,7 +95,9 @@ Next you will need to add the new authentication backend::
8995
Django's ``ModelBackend`` is only needed, if you still want to support
9096
password based authentication. If you don't, simply remove it from the list.
9197

92-
Last but not least, go to your URL root configuration ``urls.py`` and add the following::
98+
Last but not least, go to your URL root configuration ``urls.py`` and add the following:
99+
100+
.. code-block:: python
93101
94102
from django.urls import path
95103
@@ -107,12 +115,12 @@ That's it!
107115

108116
.. |version| image:: https://img.shields.io/pypi/v/django-mail-auth.svg
109117
:target: https://pypi.python.org/pypi/django-mail-auth/
110-
.. |ci| image:: https://travis-ci.com/codingjoe/django-mail-auth.svg?branch=master
118+
.. |ci| image:: https://travis-ci.com/codingjoe/django-mail-auth.svg?branch=main
111119
:target: https://travis-ci.com/codingjoe/django-mail-auth
112-
.. |coverage| image:: https://codecov.io/gh/codingjoe/django-mail-auth/branch/master/graph/badge.svg
120+
.. |coverage| image:: https://codecov.io/gh/codingjoe/django-mail-auth/branch/main/graph/badge.svg
113121
:target: https://codecov.io/gh/codingjoe/django-mail-auth
114122
.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
115-
:target: :target: https://raw.githubusercontent.com/codingjoe/django-mail-auth/master/LICENSE
123+
:target: :target: https://raw.githubusercontent.com/codingjoe/django-mail-auth/main/LICENSE
116124
.. |docs| image:: https://readthedocs.org/projects/django-mail-auth/badge/?version=latest
117125
:target: https://django-mail-auth.readthedocs.io/en/latest/?badge=latest
118126
:alt: Documentation Status

‎docs/customizing.rst‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ Custom login forms need to inherit from :class:`.BaseLoginForm` and override
1616
the :meth:`save<.BaseLoginForm.save>` method.
1717

1818
The following example is for a login SMS. This will require a
19-
custom user model with a unique ``phone_number`` field::
19+
custom user model with a unique ``phone_number`` field:
20+
21+
.. code-block:: python
2022
2123
from django import forms
2224
from django.contrib.auth import get_user_model
@@ -59,7 +61,9 @@ custom user model with a unique ``phone_number`` field::
5961
6062
6163
To add the new login form, simply add a new login view to your URL configuration with
62-
the custom form::
64+
the custom form:
65+
66+
.. code-block:: python
6367
6468
from django.urls import path
6569
from mailauth.views import LoginView

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /