diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2014-01-22 22:26:10 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-01-22 22:26:10 +0100 |
| commit | 05d36dc06e6d767bb28993c65a54b703f319a386 (patch) | |
| tree | ed2af78f1307dda6b029d866f40bf2244705733e /docs/topics/http | |
| parent | 79e1d6ebd70898d514a44b85648e3d24104c4243 (diff) | |
Always use parentheses when documenting a method with no arguments.
Diffstat (limited to 'docs/topics/http')
| -rw-r--r-- | docs/topics/http/sessions.txt | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index 2cf4751212..5711b0c490 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -219,17 +219,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 @@ -237,21 +237,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. @@ -280,7 +280,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 @@ -295,7 +295,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 @@ -303,17 +303,17 @@ You can edit it multiple times. This function accepts the same keyword arguments 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() 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 |
