Документация контроллера прав доступа¶
+Contents:
+ +Indices and tables¶
+-
+
- +
- +
- +
diff --git a/access_controller/urls.py b/access_controller/urls.py index 58864d0..be29d6c 100644 --- a/access_controller/urls.py +++ b/access_controller/urls.py @@ -39,6 +39,7 @@ urlpatterns = [ path('registration_failed/', registration_failed, name='registration_failed'), path('control/', AdminPageView.as_view(), name='control'), path('statistic/', statistic_page, name='statistic'), + ] # Django REST diff --git a/docs/source/conf.py b/docs/source/conf.py index b4be21c..5a7ba38 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,11 +11,15 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os +import sphinx.events import sys import inspect import enchant import django + +sphinx.events.core_events['autodoc-process-signature'] = '' + sys.path.insert(0, os.path.abspath('../../')) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'access_controller.settings') @@ -47,6 +51,8 @@ author = 'SHP S101, group 2' release = 'v0.01' + + # -- General configuration --------------------------------------------------- def process_django_models(app, what, name, obj, options, lines): @@ -112,8 +118,9 @@ def skip_queryset(app, what, name, obj, skip, options): return skip -def fix_sig(app, what, name, obj, options, signature, return_annotation): - return "", "" +def process_signature(app, what: str, name: str, obj, options, signature, return_annotation): + if not callable(obj): + return def setup(app): @@ -121,7 +128,7 @@ def setup(app): app.connect('autodoc-process-docstring', process_django_models) app.connect('autodoc-skip-member', skip_queryset) app.connect('autodoc-process-docstring', process_modules) - app.connect("autodoc-process-signature", fix_sig) + app.connect("autodoc-process-signature", process_signature) # Add any Sphinx extension module names here, as strings. They can be diff --git a/main/templates/base/menu.html b/main/templates/base/menu.html index 17c5f81..6ec7ab1 100644 --- a/main/templates/base/menu.html +++ b/main/templates/base/menu.html @@ -59,6 +59,9 @@ class="btn btn-secondary" {% endif %} href="{{ registration_url }}">Зарегистрироваться + {% url 'documentation' as documentation_url %} + Документация {% endif %} diff --git a/main/templates/pages/documentation.html b/main/templates/pages/documentation.html new file mode 100644 index 0000000..6e3629b --- /dev/null +++ b/main/templates/pages/documentation.html @@ -0,0 +1,252 @@ + + + + +
+ + + + +Contents:
+ +