redirect()

redirect() method

from django.shortcuts import redirect

def my_view(request):
    ...
    obj = MyModel.objects.get(...)
    return redirect(obj)
def my_view(request):
    ...
    return redirect('some-view-name', foo='bar')
def my_view(request):
    ...
    return redirect('/some/url/')

Returns an HttpResponseRedirect to the appropriate URL for the arguments passed.

redirect() — Structure map

Clickable & Draggable!

redirect() — Related pages: