Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

require http method django view

from django.views.decorators.http import require_http_methods

@require_http_methods(["GET", "POST"])
def my_view(request):
    # I can assume now that only GET or POST requests make it this far
    # ...
    pass
 
PREVIOUS NEXT
Tagged: #require #http #method #django #view
ADD COMMENT
Topic
Name
1+3 =