Skip to content

Commit 3b83fd8

Browse files
📝 Re-structure reference documentation
It's good practice to put the automatically generated documentation in a 'reference' folder and apply a little bit of glue text to make it easier to understand what is provided.
1 parent add5ad2 commit 3b83fd8

15 files changed

+80
-24
lines changed

docs/index.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,8 @@ Features
4545
:caption: Contents:
4646

4747
quickstart
48-
maykin_common/settings
49-
maykin_common/checks
50-
maykin_common/context_processors
51-
maykin_common/django_two_factor_auth
52-
maykin_common/migration_operations
53-
maykin_common/throttling
54-
maykin_common/pdf
55-
maykin_common/views
56-
maykin_common/templatetags
48+
settings
49+
reference/index
5750

5851

5952
Indices and tables

docs/maykin_common/settings.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/quickstart.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _quickstart:
2+
13
==========
24
Quickstart
35
==========
@@ -67,6 +69,8 @@ the throttling implementation.
6769

6870
For more details, see :mod:`maykin_common.throttling`.
6971

72+
.. _quickstart_pdf:
73+
7074
PDF
7175
---
7276

File renamed without changes.

docs/reference/index.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _reference_index:
2+
3+
=========
4+
Reference
5+
=========
6+
7+
Python API reference.
8+
9+
.. toctree::
10+
:maxdepth: 1
11+
:caption: Core utilities
12+
13+
checks
14+
context_processors
15+
migration_operations
16+
views
17+
templatetags
18+
19+
.. toctree::
20+
:maxdepth: 1
21+
:caption: MFA
22+
23+
django_two_factor_auth
24+
25+
.. toctree::
26+
:maxdepth: 1
27+
:caption: Axes
28+
29+
throttling
30+
31+
.. toctree::
32+
:maxdepth: 1
33+
:caption: PDF
34+
35+
pdf
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/settings.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _settings:
2+
3+
========
4+
Settings
5+
========
6+
7+
maykin-common requires a number of settings to function properly. These settings are
8+
typically provides through default-project already.
9+
10+
.. automodule:: maykin_common.settings
11+
:members:
12+
:undoc-members:

maykin_common/checks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Custom Django system checks to prevent common mistakes.
3+
"""
4+
15
import os
26

37
from django.conf import settings

maykin_common/settings.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
11
from django.conf import settings
22

33
GOOGLE_ANALYTICS_ID = None
4-
"""Google analytics id added to the request context"""
5-
4+
"""
5+
Google analytics id added to the request context.
6+
"""
67

78
SHOW_ENVIRONMENT = False
8-
"""enable or disable the `environment_info` template tag."""
9+
"""
10+
Enable or disable the ``{% environment_info %}`` template tag.
11+
"""
912

1013
ENVIRONMENT_BACKGROUND_COLOR = "orange"
11-
"""The background color of the `environment_info` template tag."""
14+
"""
15+
The background color of the ``{% environment_info %}`` template tag.
16+
"""
1217

1318
ENVIRONMENT_FOREGROUND_COLOR = "black"
14-
"""The foreground color of the `environment_info` template tag."""
19+
"""
20+
The foreground color of the ``{% environment_info %}`` template tag.
21+
"""
1522

1623
ENVIRONMENT_LABEL = None
17-
"""The foreground color of the `environment_info` template tag."""
24+
"""
25+
The textual content of the ``{% environment_info %}`` template tag.
26+
"""
1827

1928
RELEASE = None
20-
"""The environment label shown in the `version_info` template tag."""
29+
"""
30+
The release version shown in the ``{% version_info %}`` template tag.
31+
"""
2132

2233
GIT_SHA = None
23-
"""The git hash shown in the `version_info` template tag."""
34+
"""
35+
The commit hash shown in the ``{% version_info %}`` template tag.
36+
"""
2437

2538
PDF_BASE_URL_FUNCTION = None
2639
"""
2740
Function that returns the base url needed to download/resolve custom fonts and/or any
2841
image URLs included in the document to render.
42+
43+
Required for the :ref:`quickstart_pdf` extra.
2944
"""
3045

3146

0 commit comments

Comments
 (0)