Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def contact_info(request):
- if request.method == "POST":
- post = Contact()
- post.name = request.POST.get('name')
- post.email = request.POST.get('email')
- post.subject = request.POST.get('sub')
- post.message = request.POST.get('message')
- if post.message and post.name and post.email and post.subject:
- post.save()
- if post:
- return redirect('form')
- return render(request, 'index.html')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement