Fixing docstring formatting for param
Currently, ''.. param:' is being used. The correct format for sphinx is ':param <name>:' The current format raises errors when building the docs. This patch corrects the formatting and eliminates the errors. Closes-Bug: #1474972 Change-Id: I924f860dfe91c4c785d9c656825c31038072dd07
This commit is contained in:
parent
ff51ae3a5e
commit
1524a22dcf
@ -233,8 +233,7 @@ class User(models.AnonymousUser):
|
||||
Returns ``True`` if the token is expired, ``False`` if not, and
|
||||
``None`` if there is no token set.
|
||||
|
||||
.. param:: margin
|
||||
|
||||
:param margin:
|
||||
A security time margin in seconds before real expiration.
|
||||
Will return ``True`` if the token expires in less than ``margin``
|
||||
seconds of time.
|
||||
@ -249,8 +248,7 @@ class User(models.AnonymousUser):
|
||||
def is_authenticated(self, margin=None):
|
||||
"""Checks for a valid authentication.
|
||||
|
||||
.. param:: margin
|
||||
|
||||
:param margin:
|
||||
A security time margin in seconds before end of authentication.
|
||||
Will return ``False`` if authentication ends in less than ``margin``
|
||||
seconds of time.
|
||||
@ -266,8 +264,7 @@ class User(models.AnonymousUser):
|
||||
|
||||
Returns ``True`` if not authenticated,``False`` otherwise.
|
||||
|
||||
.. param:: margin
|
||||
|
||||
:param margin:
|
||||
A security time margin in seconds before end of an eventual
|
||||
authentication.
|
||||
Will return ``True`` even if authenticated but that authentication
|
||||
|
@ -80,12 +80,9 @@ def is_token_valid(token, margin=None):
|
||||
|
||||
Returns ``True`` if the token has not yet expired, otherwise ``False``.
|
||||
|
||||
.. param:: token
|
||||
|
||||
The openstack_auth.user.Token instance to check
|
||||
|
||||
.. param:: margin
|
||||
:param token: The openstack_auth.user.Token instance to check
|
||||
|
||||
:param margin:
|
||||
A time margin in seconds to subtract from the real token's validity.
|
||||
An example usage is that the token can be valid once the middleware
|
||||
passed, and invalid (timed-out) during a view rendering and this
|
||||
|
@ -153,11 +153,10 @@ def websso(request):
|
||||
def logout(request, login_url=None, **kwargs):
|
||||
"""Logs out the user if he is logged in. Then redirects to the log-in page.
|
||||
|
||||
.. param:: login_url
|
||||
|
||||
:param login_url:
|
||||
Once logged out, defines the URL where to redirect after login
|
||||
|
||||
.. param:: kwargs
|
||||
:param kwargs:
|
||||
see django.contrib.auth.views.logout_then_login extra parameters.
|
||||
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user