summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2014-01-22 22:26:10 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2014-01-22 23:00:06 +0100
commit6bf05c0267b388bdf6f2bda6f1915c1ac8a02b35 (patch)
tree3855a1de9447780739c81e4383e95fb74a54d273 /docs/topics
parent6bca149af5b8e2d6fb6fe19bdb53904f07248033 (diff)
[1.6.x] Always use parentheses when documenting a method with no arguments.
Backport of 05d36dc06e6d767bb28993c65a54b703f319a386 from master.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/http/sessions.txt26
-rw-r--r--docs/topics/testing/tools.txt2
2 files changed, 14 insertions, 14 deletions
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
index c9c38ed4a9..490f1f36de 100644
--- a/docs/topics/http/sessions.txt
+++ b/docs/topics/http/sessions.txt
@@ -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
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 6b5cd14ca2..ae291627d4 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -1039,7 +1039,7 @@ If ``multi_db=True``, fixtures are loaded into all databases.
Overriding settings
~~~~~~~~~~~~~~~~~~~
-.. method:: SimpleTestCase.settings
+.. method:: SimpleTestCase.settings()
For testing purposes it's often useful to change a setting temporarily and
revert to the original value after running the testing code. For this use case