def contact(request):
    if (request.method == 'POST'):
        firstname = request.POST.get('firstname')
        lastname = request.POST.get('lastname')
        phone = request.POST.get('phone')
        subject = request.POST.get('subject')
        contact = Contact(firstname=firstname, lastname=lastname, phone=phone, subject=subject)
        contact.save()
        messages.success(request, 'Your message has been successfully sent.')
    return render(request, 'contacts.html')
def contact(request):
    if (request.method == 'POST'):
        firstname = request.POST.get('firstname')
        lastname = request.POST.get('lastname')
        phone = request.POST.get('phone')
        subject = request.POST.get('subject')
        contact = Contact(firstname=firstname, lastname=lastname, phone=phone, subject=subject)
        contact.save()
        messages.success(request, 'Your message has been successfully sent.')
    return render(request, 'contacts.html')