Documentation fix
Add enchant, remove intersphinx useless links, remove napoleon, fix todos
This commit is contained in:
@@ -14,21 +14,26 @@ import os
|
||||
import sys
|
||||
import importlib
|
||||
import inspect
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../../'))
|
||||
|
||||
import django
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'access_controller.settings')
|
||||
os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')
|
||||
|
||||
# Fix Django's FileFields
|
||||
from django.db.models.fields.files import FileDescriptor
|
||||
FileDescriptor.__get__ = lambda self, *args, **kwargs: self
|
||||
from django.db.models.manager import ManagerDescriptor
|
||||
ManagerDescriptor.__get__ = lambda self, *args, **kwargs: self.manager
|
||||
|
||||
FileDescriptor.__get__ = lambda self, *args, **kwargs: self
|
||||
|
||||
from django.db.models.manager import ManagerDescriptor
|
||||
|
||||
ManagerDescriptor.__get__ = lambda self, *args, **kwargs: self.manager
|
||||
|
||||
# Stop Django from executing DB queries
|
||||
from django.db.models.query import QuerySet
|
||||
|
||||
QuerySet.__repr__ = lambda self: self.__class__.__name__
|
||||
try:
|
||||
import enchant # NoQA
|
||||
@@ -46,7 +51,8 @@ author = 'SHP S101, group 2'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = 'v0.01'
|
||||
|
||||
#Django sphinx setup by https://gist.github.com/codingjoe/314bda5a07ff3b41f247
|
||||
|
||||
# Django sphinx setup by https://gist.github.com/codingjoe/314bda5a07ff3b41f247
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@@ -121,7 +127,6 @@ def setup(app):
|
||||
app.connect('autodoc-process-docstring', process_modules)
|
||||
|
||||
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
@@ -132,7 +137,6 @@ extensions = [
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx_rtd_theme',
|
||||
'sphinx.ext.graphviz',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.inheritance_diagram',
|
||||
'sphinx_autodoc_typehints'
|
||||
|
||||
@@ -141,7 +145,6 @@ extensions = [
|
||||
if enchant is not None:
|
||||
extensions.append('sphinxcontrib.spelling')
|
||||
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
@@ -157,7 +160,6 @@ language = 'ru'
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = []
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
@@ -170,7 +172,6 @@ html_theme = "sphinx_rtd_theme"
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
|
||||
# -- Extension configuration -------------------------------------------------
|
||||
|
||||
# -- Options for intersphinx extension ---------------------------------------
|
||||
@@ -179,14 +180,9 @@ html_static_path = ['_static']
|
||||
intersphinx_mapping = {
|
||||
'https://docs.python.org/3/': None,
|
||||
'django': (
|
||||
'https://docs.djangoproject.com/en/dev/',
|
||||
'https://docs.djangoproject.com/en/dev/_objects/'
|
||||
),
|
||||
'djangoextensions': ('https://django-extensions.readthedocs.org/en/latest/', None),
|
||||
'geoposition': ('https://django-geoposition.readthedocs.org/en/latest/', None),
|
||||
'braces': ('https://django-braces.readthedocs.org/en/latest/', None),
|
||||
'select2': ('https://django-select2.readthedocs.org/en/latest/', None),
|
||||
'celery': ('https://celery.readthedocs.org/en/latest/', None),
|
||||
'https://docs.djangoproject.com/en/dev/',
|
||||
'https://docs.djangoproject.com/en/dev/_objects/'
|
||||
),
|
||||
}
|
||||
|
||||
autodoc_default_flags = ['members']
|
||||
|
||||
Reference in New Issue
Block a user