Skip to content

Commit

Permalink
Adapt intersphinx mappings to new sphinx version
Browse files Browse the repository at this point in the history
  • Loading branch information
timobrembeck committed Jul 18, 2022
1 parent a2fcae8 commit 27d6ddf
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion integreat_cms/api/urls.py
Expand Up @@ -119,7 +119,7 @@
path("hidden/", hiddenregions, name="regions_hidden"),
]

#: The url patterns of this module (see :doc:`topics/http/urls`)
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
path("api/regions/", include(region_api_urlpatterns)),
path("wp-json/extensions/v3/sites/", include(region_api_urlpatterns)),
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/decorators.py
@@ -1,7 +1,7 @@
"""
Django view decorators can be used to restrict the execution of a view function on certain conditions.
For more information, see :doc:`topics/http/decorators`.
For more information, see :doc:`django:topics/http/decorators`.
"""
import time
from functools import wraps
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/forms/__init__.py
@@ -1,6 +1,6 @@
"""
Forms for creating and modifying database objects.
Please refer to :mod:`django.forms` for general information about Django forms (see also: :doc:`topics/forms/index`).
Please refer to :mod:`django.forms` for general information about Django forms (see also: :doc:`django:topics/forms/index`).
"""

from .chat.chat_message_form import ChatMessageForm
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/forms/custom_model_form.py
Expand Up @@ -117,7 +117,7 @@ def save(self, commit=True):
:param commit: Whether or not the changes should be written to the database
:type commit: bool
:return: The saved object returned by :ref:`topics-modelform-save`
:return: The saved object returned by :ref:`django:topics-modelform-save`
:rtype: object
"""
self.logger.debug(
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/cms/templatetags/__init__.py
@@ -1,8 +1,8 @@
"""
Template tags are our custom extension of the :doc:`ref/templates/builtins` of :doc:`ref/templates/language`.
Template tags are our custom extension of the :doc:`django:ref/templates/builtins` of :doc:`django:ref/templates/language`.
Tags are used to provide arbitrary logic in the rendering process and are surrounded by ``{%`` and ``%}``.
Filters transform the values of variables and are surrounded by ``{{`` and ``}}``.
See :doc:`howto/custom-template-tags` for more information.
See :doc:`django:howto/custom-template-tags` for more information.
"""
4 changes: 2 additions & 2 deletions integreat_cms/cms/urls/__init__.py
Expand Up @@ -2,13 +2,13 @@
Django URL dispatcher for the cms package.
See :mod:`~integreat_cms.core.urls` for the other namespaces of this application.
For more information on this file, see :doc:`topics/http/urls`.
For more information on this file, see :doc:`django:topics/http/urls`.
"""

from django.conf.urls import include, url


#: The url patterns of this module (see :doc:`topics/http/urls`)
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
url(r"^", include("integreat_cms.cms.urls.public")),
url(r"^", include("integreat_cms.cms.urls.protected")),
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/urls/protected.py
Expand Up @@ -168,7 +168,7 @@
),
]

#: The url patterns of this module (see :doc:`topics/http/urls`)
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
path(
"admin-dashboard/",
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/urls/public.py
Expand Up @@ -33,7 +33,7 @@
"COMPANY_URL": settings.COMPANY_URL,
}

#: The url patterns of this module (see :doc:`topics/http/urls`)
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
path("", dashboard.RegionSelection.as_view(), name="region_selection"),
path(
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/core/circleci_settings.py
@@ -1,8 +1,8 @@
"""
Django settings for our CircleCI workflow.
All configuration is imported from :mod:`~integreat_cms.core.settings` except it sets all logging to simple console output.
For more information on this file, see :doc:`topics/settings`.
For the full list of settings and their values, see :doc:`ref/settings`.
For more information on this file, see :doc:`django:topics/settings`.
For the full list of settings and their values, see :doc:`django:ref/settings`.
"""
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/core/middleware/__init__.py
@@ -1,5 +1,5 @@
"""
This package contains custom middlewares, see :doc:`topics/http/middleware` and :doc:`ref/middleware`.
This package contains custom middlewares, see :doc:`django:topics/http/middleware` and :doc:`django:ref/middleware`.
"""
from .access_control_middleware import AccessControlMiddleware
from .region_middleware import RegionMiddleware
Expand Down
14 changes: 7 additions & 7 deletions integreat_cms/core/settings.py
Expand Up @@ -592,37 +592,37 @@
# INTERNATIONALIZATION #
########################

#: A list of all available languages (see :setting:`django:LANGUAGES` and :doc:`topics/i18n/index`)
#: A list of all available languages (see :setting:`django:LANGUAGES` and :doc:`django:topics/i18n/index`)
LANGUAGES = (
("en", "English"),
("de", "Deutsch"),
)

#: A list of directories where Django looks for translation files
#: (see :setting:`django:LOCALE_PATHS` and :doc:`topics/i18n/index`)
#: (see :setting:`django:LOCALE_PATHS` and :doc:`django:topics/i18n/index`)
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),)

#: A string representing the language slug for this installation
#: (see :setting:`django:LANGUAGE_CODE` and :doc:`topics/i18n/index`)
#: (see :setting:`django:LANGUAGE_CODE` and :doc:`django:topics/i18n/index`)
LANGUAGE_CODE = "de"

#: A string representing the time zone for this installation
#: (see :setting:`django:TIME_ZONE` and :doc:`topics/i18n/index`)
#: (see :setting:`django:TIME_ZONE` and :doc:`django:topics/i18n/index`)
TIME_ZONE = "UTC"

#: A string representing the time zone that is used for rendering
CURRENT_TIME_ZONE = os.environ.get("INTEGREAT_CMS_CURRENT_TIME_ZONE", "Europe/Berlin")

#: A boolean that specifies whether Django’s translation system should be enabled
#: (see :setting:`django:USE_I18N` and :doc:`topics/i18n/index`)
#: (see :setting:`django:USE_I18N` and :doc:`django:topics/i18n/index`)
USE_I18N = True

#: A boolean that specifies if localized formatting of data will be enabled by default or not
#: (see :setting:`django:USE_L10N` and :doc:`topics/i18n/index`)
#: (see :setting:`django:USE_L10N` and :doc:`django:topics/i18n/index`)
USE_L10N = True

#: A boolean that specifies if datetimes will be timezone-aware by default or not
#: (see :setting:`django:USE_TZ` and :doc:`topics/i18n/index`)
#: (see :setting:`django:USE_TZ` and :doc:`django:topics/i18n/index`)
USE_TZ = True


Expand Down
6 changes: 3 additions & 3 deletions integreat_cms/core/sphinx_settings.py
Expand Up @@ -3,8 +3,8 @@
All configuration is imported from :mod:`~integreat_cms.core.settings` except it sets :attr:`USE_I18N` to ``False`` to
make sure the documentation is not partially translated.
For more information on this file, see :doc:`topics/settings`.
For the full list of settings and their values, see :doc:`ref/settings`.
For more information on this file, see :doc:`django:topics/settings`.
For the full list of settings and their values, see :doc:`django:ref/settings`.
"""
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import
Expand All @@ -15,7 +15,7 @@
SECRET_KEY = "dummy"

#: A boolean that specifies whether Django’s translation system should be enabled
#: (see :setting:`django:USE_I18N` and :doc:`topics/i18n/index`)
#: (see :setting:`django:USE_I18N` and :doc:`django:topics/i18n/index`)
USE_I18N = False

# Remove cacheops during documentation build because it changes related names
Expand Down
6 changes: 3 additions & 3 deletions integreat_cms/core/urls.py
Expand Up @@ -12,17 +12,17 @@
* ``/`` to :mod:`~integreat_cms.cms.urls`
Additionally, the error handlers in :mod:`~integreat_cms.cms.views.error_handler` are referenced here (see :doc:`ref/urls`).
Additionally, the error handlers in :mod:`~integreat_cms.cms.views.error_handler` are referenced here (see :doc:`django:ref/urls`).
For more information on this file, see :doc:`topics/http/urls`.
For more information on this file, see :doc:`django:topics/http/urls`.
"""
from django.conf import settings
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin


#: The url patterns of this module (see :doc:`topics/http/urls`)
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
path("", include("integreat_cms.api.urls")),
path(
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/core/wsgi.py
Expand Up @@ -5,7 +5,7 @@
:doc:`wsgi:index` (Web Server Gateway Interface) is a simple calling convention for web servers to forward requests to
python frameworks (in our case Django).
For more information on this file, see :doc:`howto/deployment/wsgi/index`.
For more information on this file, see :doc:`django:howto/deployment/wsgi/index`.
"""
import configparser
import os
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/sitemap/__init__.py
@@ -1,4 +1,4 @@
"""
This package contains all classes for building the webapp's sitemap dynamically.
It makes use of :doc:`ref/contrib/sitemaps`, an inbuilt Django package.
It makes use of :doc:`django:ref/contrib/sitemaps`, an inbuilt Django package.
"""
4 changes: 2 additions & 2 deletions integreat_cms/sitemap/urls.py
Expand Up @@ -8,7 +8,7 @@
See :mod:`~integreat_cms.core.urls` for the other namespaces of this application.
For more information on this file, see :doc:`topics/http/urls`.
For more information on this file, see :doc:`django:topics/http/urls`.
"""
from django.urls import path, include

Expand All @@ -18,7 +18,7 @@
#: The namespace for this URL config (see :attr:`django.urls.ResolverMatch.app_name`)
app_name = "sitemap"

#: The url patterns of this module (see :doc:`topics/http/urls`)
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
path("sitemap.xml", SitemapIndexView.as_view(), name="index"),
path("wp-json/ig-sitemap/v1/sitemap-index.xml", SitemapIndexView.as_view()),
Expand Down
6 changes: 3 additions & 3 deletions sphinx/conf.py
Expand Up @@ -114,9 +114,9 @@
templates_path = ["templates"]
#: Markup to shorten external links (see :doc:`sphinx:usage/extensions/extlinks`)
extlinks = {
"github": (f"{github_url}/%s", ""),
"github-source": (f"{github_url}/blob/develop/%s", ""),
"django-source": (f"{django_github_url}/%s", ""),
"github": (f"{github_url}/%s", None),
"github-source": (f"{github_url}/blob/develop/%s", None),
"django-source": (f"{django_github_url}/%s", None),
}
#: A string of reStructuredText that will be included at the end of every source file that is read. Used for substitutions.
rst_epilog = f"""
Expand Down
4 changes: 2 additions & 2 deletions sphinx/documentation.rst
Expand Up @@ -9,7 +9,7 @@ The generation process is divided into two stages:
1. :doc:`sphinx:man/sphinx-apidoc` is a tool which scans the whole source code of our application in the ``integreat_cms``
directory and generates ``.rst`` files out of the Python docstrings. These files are then placed in the
``sphinx/ref-ext`` directory.
2. :doc:`man/sphinx-build` generates the html documentation out of the ``.rst`` files located in the sphinx directory.
2. :doc:`sphinx:man/sphinx-build` generates the html documentation out of the ``.rst`` files located in the sphinx directory.
It merges the static ``.rst`` files directly in the ``sphinx`` directory together with the files generated in step 1
in ``sphinx/ref-ext`` and the simplified ``.rst`` files in ``sphinx/ref``.

Expand Down Expand Up @@ -50,7 +50,7 @@ Cross-referencing
=================

Whenever you want to reference another module, class or function inside a static documentation page or within a
docstring, use the according :doc:`usage/restructuredtext/domains` and have a look at :ref:`sphinx:python-roles`.
docstring, use the according :doc:`sphinx:usage/restructuredtext/domains` and have a look at :ref:`sphinx:python-roles`.

Example:
``:class:`~integreat_cms.cms.models.regions.region.Region``` becomes :class:`~integreat_cms.cms.models.regions.region.Region`
Expand Down
2 changes: 1 addition & 1 deletion sphinx/internationalization.rst
Expand Up @@ -2,7 +2,7 @@
Internationalization (i18n)
***************************

For more detailed information, have a look at the official Django documentation on :doc:`topics/i18n/index`.
For more detailed information, have a look at the official Django documentation on :doc:`django:topics/i18n/index`.


Hardcoded Strings
Expand Down
2 changes: 1 addition & 1 deletion sphinx/testing.rst
Expand Up @@ -11,7 +11,7 @@ In addition, we use the following plugins:
* :doc:`pytest-django <pytest-django:index>`: Provide a few helpers for Django
* :doc:`pytest-xdist:index`: Enable distributing tests across multiple CPUs to speed up test execution

For more information, see :doc:`topics/testing/index` and :doc:`topics/testing/overview`.
For more information, see :doc:`django:topics/testing/index` and :doc:`django:topics/testing/overview`.

For reference of our test framework and test cases, see :mod:`tests`.

Expand Down
2 changes: 1 addition & 1 deletion sphinx/virtualenv.rst
Expand Up @@ -2,7 +2,7 @@
Virtual Environment (Pipenv)
****************************

All python dependencies are installed in a virtual Python environment (see :doc:`tutorial/venv`).
All python dependencies are installed in a virtual Python environment (see :doc:`python:tutorial/venv`).

As package manager for the virtual environment we use Pipenv

Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Expand Up @@ -7,5 +7,5 @@
* :doc:`pytest-django <pytest-django:index>`: Provide a few helpers for Django
* :doc:`pytest-xdist:index`: Enable distributing tests across multiple CPUs to speed up test execution
For more information, see :doc:`topics/testing/index` and :doc:`topics/testing/overview`.
For more information, see :doc:`django:topics/testing/index` and :doc:`django:topics/testing/overview`.
"""

0 comments on commit 27d6ddf

Please sign in to comment.