Skip to content
Permalink
Browse files

Set up intersphinx, use it with flask_login

  • Loading branch information...
lukasjuhrich committed Mar 1, 2019
1 parent 30efa07 commit 303073c00decf36f8a8cfc2ccccfa7a5d81995d2
Showing with 11 additions and 1 deletion.
  1. +8 −0 docs/source/conf.py
  2. +3 −1 sipa/model/user.py
@@ -37,6 +37,7 @@
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
]

# Add any paths that contain templates here, relative to this directory.
@@ -352,3 +353,10 @@
# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False

### Intersphinx

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'flask_flatpages': ('https://flask-login.readthedocs.io/en/latest/', None),
}
@@ -81,7 +81,9 @@ def get(cls: Type[T], username: str) -> T:
def from_ip(cls: Type[T], ip: str) -> T:
"""Return a user based on an ip.
If there is no user associated with this ip, return AnonymousUserMixin.
If there is no user associated with this ip, return
:py:class:`~flask_login.AnonymousUserMixin`.
:param ip: the ip
:return: the user object
"""

0 comments on commit 303073c

Please sign in to comment.
You can’t perform that action at this time.