コード例 #1
0
def contactUs(request):
    if request.method == "POST":
        c = Contact()        
        c.name = request.POST["name"]
        c.phone = request.POST["phone"]
        c.email = request.POST["email"]
        c.description = request.POST["message"]
        c.save()

    a = Home.objects.get(id=1)
    
    context= {
       'detail':a   

    }
    return render(request, 'core/contact.html',context=context)