mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
This commit is contained in:
parent
c67ea79aa9
commit
ba755ca131
57 changed files with 443 additions and 269 deletions
|
|
@ -127,13 +127,15 @@ You can use the :func:`redirect` function in a number of ways.
|
|||
...
|
||||
return redirect('some-view-name', foo='bar')
|
||||
|
||||
#. By passing a hardcoded URL to redirect to::
|
||||
#. By passing a hardcoded URL to redirect to:
|
||||
::
|
||||
|
||||
def my_view(request):
|
||||
...
|
||||
return redirect('/some/url/')
|
||||
|
||||
This also works with full URLs::
|
||||
This also works with full URLs:
|
||||
::
|
||||
|
||||
def my_view(request):
|
||||
...
|
||||
|
|
|
|||
|
|
@ -865,7 +865,9 @@ Secondly, you can include an object that contains embedded namespace data. If
|
|||
you ``include()`` a list of :func:`~django.urls.path` or
|
||||
:func:`~django.urls.re_path` instances, the URLs contained in that object
|
||||
will be added to the global namespace. However, you can also ``include()`` a
|
||||
2-tuple containing::
|
||||
2-tuple containing:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
(<list of path()/re_path() instances>, <application namespace>)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue