Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Django Form

blog/views.py
def third(request):
   return render(request,'third.html', {'name': request.method})
 
 
blog/urls.py
path('', views.index, name='index'),
path('second', views.second, name='index'),
path('hello', views.third, name='index')

blog/template/mypage.html
<form action="/blog/hello" method="POST">
    {% csrf_token %}
<input type="submit" value="submit"/>
</form>
Source by codingtutz.com #
 
PREVIOUS NEXT
Tagged: #Django #Form
ADD COMMENT
Topic
Name
6+6 =