Applied Sphinx autodoc, and added the automatically-generated module documents to the documentation.

This commit is contained in:
依瑪貓 2022-12-08 00:52:49 +08:00
parent 64e81a64ef
commit d09255432d
8 changed files with 255 additions and 2 deletions

View File

@ -0,0 +1,21 @@
accounting.migrations package
=============================
Submodules
----------
accounting.migrations.0001\_initial module
------------------------------------------
.. automodule:: accounting.migrations.0001_initial
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: accounting.migrations
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,94 @@
accounting package
==================
Subpackages
-----------
.. toctree::
:maxdepth: 4
accounting.migrations
accounting.templatetags
Submodules
----------
accounting.apps module
----------------------
.. automodule:: accounting.apps
:members:
:undoc-members:
:show-inheritance:
accounting.converters module
----------------------------
.. automodule:: accounting.converters
:members:
:undoc-members:
:show-inheritance:
accounting.forms module
-----------------------
.. automodule:: accounting.forms
:members:
:undoc-members:
:show-inheritance:
accounting.models module
------------------------
.. automodule:: accounting.models
:members:
:undoc-members:
:show-inheritance:
accounting.tests module
-----------------------
.. automodule:: accounting.tests
:members:
:undoc-members:
:show-inheritance:
accounting.urls module
----------------------
.. automodule:: accounting.urls
:members:
:undoc-members:
:show-inheritance:
accounting.utils module
-----------------------
.. automodule:: accounting.utils
:members:
:undoc-members:
:show-inheritance:
accounting.validators module
----------------------------
.. automodule:: accounting.validators
:members:
:undoc-members:
:show-inheritance:
accounting.views module
-----------------------
.. automodule:: accounting.views
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: accounting
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,21 @@
accounting.templatetags package
===============================
Submodules
----------
accounting.templatetags.accounting module
-----------------------------------------
.. automodule:: accounting.templatetags.accounting
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: accounting.templatetags
:members:
:undoc-members:
:show-inheritance:

View File

@ -2,6 +2,14 @@
# #
# For the full list of built-in configuration values, see the documentation: # For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html # https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
import django
sys.path.insert(0, os.path.abspath('../../src/'))
sys.path.append(os.path.abspath('../../tests/test_site/'))
os.environ["DJANGO_SETTINGS_MODULE"] = "test_site.settings"
django.setup()
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@ -14,7 +22,7 @@ release = '0.1.0'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [] extensions = ["sphinx.ext.autodoc"]
templates_path = ['_templates'] templates_path = ['_templates']
exclude_patterns = [] exclude_patterns = []
@ -24,5 +32,5 @@ exclude_patterns = []
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster' html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static'] html_static_path = ['_static']

View File

@ -0,0 +1,10 @@
mia\_core.migrations package
============================
Module contents
---------------
.. automodule:: mia_core.migrations
:members:
:undoc-members:
:show-inheritance:

70
docs/source/mia_core.rst Normal file
View File

@ -0,0 +1,70 @@
mia\_core package
=================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mia_core.migrations
mia_core.templatetags
Submodules
----------
mia\_core.apps module
---------------------
.. automodule:: mia_core.apps
:members:
:undoc-members:
:show-inheritance:
mia\_core.models module
-----------------------
.. automodule:: mia_core.models
:members:
:undoc-members:
:show-inheritance:
mia\_core.period module
-----------------------
.. automodule:: mia_core.period
:members:
:undoc-members:
:show-inheritance:
mia\_core.tests module
----------------------
.. automodule:: mia_core.tests
:members:
:undoc-members:
:show-inheritance:
mia\_core.utils module
----------------------
.. automodule:: mia_core.utils
:members:
:undoc-members:
:show-inheritance:
mia\_core.views module
----------------------
.. automodule:: mia_core.views
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mia_core
:members:
:undoc-members:
:show-inheritance:

View File

@ -0,0 +1,21 @@
mia\_core.templatetags package
==============================
Submodules
----------
mia\_core.templatetags.mia\_core module
---------------------------------------
.. automodule:: mia_core.templatetags.mia_core
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mia_core.templatetags
:members:
:undoc-members:
:show-inheritance:

8
docs/source/modules.rst Normal file
View File

@ -0,0 +1,8 @@
src
===
.. toctree::
:maxdepth: 4
accounting
mia_core