def contact(request): if request.method == "POST": email = request.POST.get('email') query = request.POST.get('query') contact = Contact(email=email, query=query, date=datetime.today()) contact.save() return render(request, 'contact.html')
def contact(request): if request.method == "POST": name = request.POST.get('name') email = request.POST.get('email') contact = Contact(name=name, email=email) contact.save() messages.success(request, 'You are succesfully subscribed') return render(request, 'contact.html')
def contact(request): if request.method == "POST": name = request.POST.get('name') mail = request.POST.get('email') feedback = request.POST.get('feedback') cont = Contact(name=name,mail=mail,feedback=feedback,date=datetime.today()) cont.save() messages.success(request,"Your feedback has been successfully sent!") return render(request,'contact.html')
def contact(request): if request.method == "POST": name = request.POST.get("txtName") email = request.POST.get("txtEmail") phno = request.POST.get("txtPhone") msg = request.POST.get("txtMsg") contact = Contact(name=name,email=email,phno=phno,msg=msg,datetime=datetime.now()) contact.save() messages.success(request, 'Your Message Sent!.') return render(request, "contact.html")
def contact(request): if request.method == "POST": name = request.POST.get('name') email = request.POST.get('email') phone = request.POST.get('phone') address = request.POST.get('address') decs = request.POST.get('decs') contact = Contact(name=name, email=email, phone=phone, address=address, decs=decs, date=datetime.today()) contact.save() messages.success(request, 'Your message has been sent') return render(request, 'contact.html')
def contact(request): if request.method == "POST": name = request.POST.get('name') email = request.POST.get('email') phone = request.POST.get('phone') desc = request.POST.get('desc') contact = Contact(name=name, email=email, phone=phone, desc=desc, date = datetime.today()) contact.save() messages.success(request, 'Your message has been sent!.') return render(request, 'contact.html') #return HttpResponse("this is Contact page")
def Home(request): if request.method == "POST": name = request.POST['name'] email = request.POST['email'] number = request.POST['phone'] desc = request.POST['message'] #print(name, email, phone, desc) ins = Contact(name=name, number=number, email=email, desc=desc) ins.save() # print("the data has been written inside the database") return render(request, 'home.html')
def contact(request): if request.method == "POST": name = request.POST.get('name') email = request.POST.get('email') phone = request.POST.get('phone') date = request.POST.get('date') index = Contact(name=name, email=email, phone=phone, date=datetime.today()) index.save() return render(request, 'index.html')
def contact(request): if request.method == 'POST': name = request.POST.get('name') email = request.POST.get('email') phone = request.POST.get('phone') message = request.POST.get('message') contact = Contact(name=name, email=email, phone=phone, message=message, date=datetime.today()) contact.save() messages.success(request, 'You have contacted successfully') return render(request, "contact.html")
def contact(request): # messages.error(request, 'Welcome to Contact. Please fill details and add messsage and click submit button to contact us.') if request.method == "POST": name = request.POST['name'] email = request.POST['email'] phone = request.POST['phone'] desc = request.POST['desc'] if len(name)<4 or len(email)<3 or len(phone)<10 or len(desc)<5: messages.error(request,"Please fill the form correctly") else: contact = Contact(name=name, email=email,phone=phone,desc=desc) contact.save() messages.success(request,"Message is sent successfully. We will contact you soon.") return render(request,'home/contact.html')
def contact(request): if request.method == "POST": name = request.POST.get('name') desc = request.POST.get('desc') contact = Contact(name=name, desc=desc) contact.save() messages.success( request, 'Your form has been Submitted Succesfully.We will get back to you soon Through E-mail!' ) return render(request, 'contact.html') #return HttpResponse("this is contact page")
def contact(requests): if requests.method == "POST": name = requests.POST.get('name') email = requests.POST.get('email') phone = requests.POST.get('phone') desc = requests.POST.get('desc') contact = Contact(name=name, email=email, phone=phone, desc=desc, date=datetime.today()) contact.save() messages.success( requests, 'Thanks for Contacting Us. Your message has been sent.') return render(requests, 'contact.html')
def contact(request): if request.method == 'POST': name = request.POST['name'] email = request.POST['email'] phone = request.POST['phone'] content = request.POST['content'] if len(name) < 3 or len(email) < 4 or len(phone) < 10 or len( content) < 5: messages.error(request, "Please fill the form correctly.") else: contact = Contact(name=name, email=email, phone=phone, content=content) contact.save() messages.success(request, "Your message saved successfully.") return render(request, 'blog/contact.html')
def contacts(request): if request.method == "POST": # name = request.POST.get('name') # phone = request.POST.get('phone') # email = request.POST.get('email') # desc = request.POST.get('desc') # contact = Contact(name=name, phone=phone, email=email, desc=desc, date=datetime.today()) contact = Contact(name=request.POST.get('name'), phone=request.POST.get('phone'), email=request.POST.get('email'), desc=request.POST.get('desc'), date=datetime.today()) contact.save() messages.success( request, 'We have received your message successfully, we will get back to you soon.' ) return render(request, 'contact.html')