Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Sending POST request in Django

templates/third.html
<form action="/blog/hello" method="POST">
    {% csrf_token %}
    <input name="v" /> 
<input type="submit" value="submit"/>

views.py

def third(request):
    
   if request.method=="POST":
         return render(request,'third.html', {'name': request.POST['v']})
   else:
       return HttpResponse("HELLO WORLD IS TRUE")
Comment

PREVIOUS NEXT
Code Example
Python :: create an empty numpy array and append 
Python :: add new row to numpy array 
Python :: pip install django celery results 
Python :: Aligning rotated xticklabels with their respective xticks 
Python :: Fast api importing optional 
Python :: group by, aggregate multiple column -pandas 
Python :: python practice 
Python :: break all loops 
Python :: python array scalar multiplication 
Python :: check is string is nan python 
Python :: how to change port in flask app 
Python :: python download file from url requests 
Python :: print A to z vy using loop in python 
Python :: python last 3 list elements 
Python :: iterate over dataframe 
Python :: python distilled 
Python :: change float column to percentage python 
Python :: how to make a discord bot in python 
Python :: factorial of a number in python 
Python :: append to list py 
Python :: at=error code=H10 desc="App crashed" django 
Python :: map example in python 
Python :: queue using linked list in python 
Python :: adding text cv2 
Python :: how to make an int into a string python 
Python :: pandas eliminar filas de un dataframe con una condicion 
Python :: how to repeat if statement in python 
Python :: how to get a dictionary in alphabetical order python 
Python :: how to exit program in python 
Python :: python script that executes at time 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =