mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #18159 -- added an import statement to the docs. Thanks to Jeff Hui for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e7d648d8cb
commit
bc8b9bd438
2 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,8 @@ You can use the :func:`redirect` function in a number of ways.
|
|||
:meth:`~django.db.models.Model.get_absolute_url` method will be called
|
||||
to figure out the redirect URL::
|
||||
|
||||
from django.shortcuts import redirect
|
||||
|
||||
def my_view(request):
|
||||
...
|
||||
object = MyModel.objects.get(...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue