Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

redirect django

from django.shortcuts import redirect
from .models import Element


def element_info(request):
    # ...
    element = Element.object.get(pk=1)
    return redirect('element_update', pk=element.id)

def element_update(request, pk)
    # ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #redirect #django
ADD COMMENT
Topic
Name
1+1 =