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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB29Dkm6toxTQiYy2-8BREdv0z%2B2go87eO4o-%2BeUAys6yfN44g%40mail.gmail.com.

Reply via email to