Error seems to be in allotment_exam.Examname model. The model code which you have pastes is of “Exam”
Regards, Parth Joshi > On 10-Nov-2019, at 11:34 AM, Mohan Goud <kathi.mohang...@gmail.com> wrote: > > > > I have to import the data into models from excel sheet from admin site and > the code is > > models.py > > class Exam(models.Model): Examname = models.CharField(null=False, > blank=False, max_length=255) > class Meta: unique_together = ["Examname"] > def str(self): return self.Examname > > admin.py > > @admin.register(Exam) class ViewAdmin(ImportExportModelAdmin): exclude = > ('id', ) > > While importing the data the errors are Line number: 2 - NOT NULL constraint > failed: allotment_exam.Examname and Line number: 3 - NOT NULL constraint > failed: allotment_exam.Examname > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com > <mailto:django-users+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAB29Dkm6toxTQiYy2-8BREdv0z%2B2go87eO4o-%2BeUAys6yfN44g%40mail.gmail.com > > <https://groups.google.com/d/msgid/django-users/CAB29Dkm6toxTQiYy2-8BREdv0z%2B2go87eO4o-%2BeUAys6yfN44g%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/12B52CDD-3CED-4BA9-B385-4CC2D1335873%40gmail.com.