Skip to content

Commit

Permalink
Set up intersphinx, use it with flask_login
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Mar 3, 2019
1 parent 30efa07 commit 303073c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/source/conf.py
Expand Up @@ -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.
Expand Down Expand Up @@ -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),
}
4 changes: 3 additions & 1 deletion sipa/model/user.py
Expand Up @@ -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
"""
Expand Down

0 comments on commit 303073c

Please sign in to comment.