Answers for "how to send form data in django"

1

passing user instance django form submission

if form.is_valid():
    post = form.save(commit=False)
    post.author = request.user
    post.published_date = timezone.now()
    post.save()
Posted by: Guest on December-20-2020
1

django get form id from request

# html
<input type="submit" value="Reply" name ="message_frm">

# views.py
if 'message_frm' in request.POST:
    #do somethings
Posted by: Guest on October-15-2020

Code answers related to "how to send form data in django"

Python Answers by Framework

Browse Popular Code Answers by Language