skip to Main Content

Django – Form is getting submitted but nothing saves in database – Mysql

My form is getting submitted by in phpmyadmin nothing get saved please help. Models.py from django.db import models class Customers(models.Model): first_name=models.CharField(max_length=100) . . . address=models.CharField(max_length=100) mar_stat=models.CharField(max_length=100) class Meta: db_table="customers" Views.py def customerreg(request): if request.method=='POST': if request.POST.get('first_name') and request.POST.get('last_name') and request.POST.get('gender')…

VIEW QUESTION
Back To Top
Search