diff options
| author | Tim Graham <timograham@gmail.com> | 2016-02-01 11:54:26 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-02-01 11:54:26 -0500 |
| commit | a9fbf0735a213109ef4b02e02ff3e458b6a25929 (patch) | |
| tree | c9ac521f09711d087e1c501b8427bb102d268fed /docs/topics/http | |
| parent | d7a6086825d4a308955e792f65fdd9b5f714a505 (diff) | |
[1.9.x] Fixed #26124 -- Added missing code formatting to docs headers.
Backport of a6ef025dfb2a1d1bd23893408eef6d066fb506d9 from master
Diffstat (limited to 'docs/topics/http')
| -rw-r--r-- | docs/topics/http/middleware.txt | 24 | ||||
| -rw-r--r-- | docs/topics/http/sessions.txt | 4 | ||||
| -rw-r--r-- | docs/topics/http/shortcuts.txt | 20 | ||||
| -rw-r--r-- | docs/topics/http/urls.txt | 4 | ||||
| -rw-r--r-- | docs/topics/http/views.txt | 4 |
5 files changed, 28 insertions, 28 deletions
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index 3cd6baa520..52f3628fc7 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -86,8 +86,8 @@ Python class that defines one or more of the following methods: .. _request-middleware: -``process_request`` -------------------- +``process_request()`` +--------------------- .. method:: process_request(request) @@ -107,8 +107,8 @@ return the result. .. _view-middleware: -``process_view`` ----------------- +``process_view()`` +------------------ .. method:: process_view(request, view_func, view_args, view_kwargs) @@ -146,8 +146,8 @@ view; it'll apply response middleware to that .. _template-response-middleware: -``process_template_response`` ------------------------------ +``process_template_response()`` +------------------------------- .. method:: process_template_response(request, response) @@ -173,8 +173,8 @@ includes ``process_template_response()``. .. _response-middleware: -``process_response`` --------------------- +``process_response()`` +---------------------- .. method:: process_response(request, response) @@ -230,8 +230,8 @@ must test for streaming responses and adjust their behavior accordingly:: .. _exception-middleware: -``process_exception`` ---------------------- +``process_exception()`` +----------------------- .. method:: process_exception(request, exception) @@ -249,8 +249,8 @@ Again, middleware are run in reverse order during the response phase, which includes ``process_exception``. If an exception middleware returns a response, the middleware classes above that middleware will not be called at all. -``__init__`` ------------- +``__init__()`` +-------------- Most middleware classes won't need an initializer since middleware classes are essentially placeholders for the ``process_*`` methods. If you do need some diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index b70e14acbb..c495bb5b4c 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -335,7 +335,7 @@ easily available on the internet. Although the cookie session storage signs the cookie-stored data to prevent tampering, a :setting:`SECRET_KEY` leak immediately escalates to a remote code execution vulnerability. -Bundled Serializers +Bundled serializers ~~~~~~~~~~~~~~~~~~~ .. class:: serializers.JSONSerializer @@ -365,7 +365,7 @@ Bundled Serializers .. _custom-serializers: -Write Your Own Serializer +Write your own serializer ~~~~~~~~~~~~~~~~~~~~~~~~~ Note that unlike :class:`~django.contrib.sessions.serializers.PickleSerializer`, diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index 064e6daa35..2575d78b09 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -12,8 +12,8 @@ The package ``django.shortcuts`` collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. -``render`` -========== +``render()`` +============ .. function:: render(request, template_name, context=None, context_instance=_context_instance_undefined, content_type=None, status=None, current_app=_current_app_undefined, dirs=_dirs_undefined, using=None) @@ -113,8 +113,8 @@ This example is equivalent to:: return HttpResponse(t.render(c, request), content_type="application/xhtml+xml") -``render_to_response`` -====================== +``render_to_response()`` +======================== .. function:: render_to_response(template_name, context=None, context_instance=_context_instance_undefined, content_type=None, status=None, dirs=_dirs_undefined, using=None) @@ -180,8 +180,8 @@ Optional arguments The ``dirs`` parameter was deprecated. -``redirect`` -============ +``redirect()`` +============== .. function:: redirect(to, permanent=False, *args, **kwargs) @@ -248,8 +248,8 @@ will be returned:: object = MyModel.objects.get(...) return redirect(object, permanent=True) -``get_object_or_404`` -===================== +``get_object_or_404()`` +======================= .. function:: get_object_or_404(klass, *args, **kwargs) @@ -321,8 +321,8 @@ Note: As with ``get()``, a :class:`~django.core.exceptions.MultipleObjectsReturned` exception will be raised if more than one object is found. -``get_list_or_404`` -=================== +``get_list_or_404()`` +===================== .. function:: get_list_or_404(klass, *args, **kwargs) diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index b5f108e309..cf406a64e6 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -234,8 +234,8 @@ Performance Each regular expression in a ``urlpatterns`` is compiled the first time it's accessed. This makes the system blazingly fast. -Syntax of the urlpatterns variable -================================== +Syntax of the ``urlpatterns`` variable +====================================== ``urlpatterns`` should be a Python list of :func:`~django.conf.urls.url` instances. diff --git a/docs/topics/http/views.txt b/docs/topics/http/views.txt index c21012fa64..020c06e090 100644 --- a/docs/topics/http/views.txt +++ b/docs/topics/http/views.txt @@ -94,8 +94,8 @@ to create a return class for any status code you like. For example:: Because 404 errors are by far the most common HTTP error, there's an easier way to handle those errors. -The Http404 exception ---------------------- +The ``Http404`` exception +------------------------- .. class:: django.http.Http404() |
