1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

[1.6.x] Always use parentheses when documenting a method with no arguments.

Backport of 05d36dc06e from master.
This commit is contained in:
Baptiste Mispelon
2014-01-22 22:26:10 +01:00
parent 6bca149af5
commit 6bf05c0267
11 changed files with 35 additions and 35 deletions

View File

@@ -218,17 +218,17 @@ You can edit it multiple times.
Example: ``fav_color = request.session.pop('fav_color')``
.. method:: keys
.. method:: keys()
.. method:: items
.. method:: items()
.. method:: setdefault
.. method:: setdefault()
.. method:: clear
.. method:: clear()
It also has these methods:
.. method:: flush
.. method:: flush()
Delete the current session data from the session and regenerate the
session key value that is sent back to the user in the cookie. This is
@@ -236,21 +236,21 @@ You can edit it multiple times.
accessed again from the user's browser (for example, the
:func:`django.contrib.auth.logout()` function calls it).
.. method:: set_test_cookie
.. method:: set_test_cookie()
Sets a test cookie to determine whether the user's browser supports
cookies. Due to the way cookies work, you won't be able to test this
until the user's next page request. See `Setting test cookies`_ below for
more information.
.. method:: test_cookie_worked
.. method:: test_cookie_worked()
Returns either ``True`` or ``False``, depending on whether the user's
browser accepted the test cookie. Due to the way cookies work, you'll
have to call ``set_test_cookie()`` on a previous, separate page request.
See `Setting test cookies`_ below for more information.
.. method:: delete_test_cookie
.. method:: delete_test_cookie()
Deletes the test cookie. Use this to clean up after yourself.
@@ -279,7 +279,7 @@ You can edit it multiple times.
purposes. Session expiration is computed from the last time the
session was *modified*.
.. method:: get_expiry_age
.. method:: get_expiry_age()
Returns the number of seconds until this session expires. For sessions
with no custom expiration (or those set to expire at browser close), this
@@ -294,7 +294,7 @@ You can edit it multiple times.
``None``. Defaults to the value stored in the session by
:meth:`set_expiry`, if there is one, or ``None``.
.. method:: get_expiry_date
.. method:: get_expiry_date()
Returns the date this session will expire. For sessions with no custom
expiration (or those set to expire at browser close), this will equal the
@@ -302,19 +302,19 @@ You can edit it multiple times.
This function accepts the same keyword argumets as :meth:`get_expiry_age`.
.. method:: get_expire_at_browser_close
.. method:: get_expire_at_browser_close()
Returns either ``True`` or ``False``, depending on whether the user's
session cookie will expire when the user's Web browser is closed.
.. method:: clear_expired
.. method:: clear_expired()
.. versionadded:: 1.5
Removes expired sessions from the session store. This class method is
called by :djadmin:`clearsessions`.
.. method:: cycle_key
.. method:: cycle_key()
Creates a new session key while retaining the current session data.
:func:`django.contrib.auth.login()` calls this method to mitigate against