Hello everyone I have created one webpage where I am using Django ‘import_export’ Resource for .xlsfile upload. I am having below fields name in the .xls file as shown below image.
Now here id is my primary key and upload functionality is working fine. Now I want that when the user is uploading details AConnectID should be checked/validated and if it is blank then the process should stop.
I have tried using null=False and validator but it is working at the form level.
AConnectID = models.CharField(max_length=100, null=False,validators= [validators.MinLengthValidator(3)])
Any help on this how-to validates it?.
class CTAResource(resources.ModelResource): class meta: Model=CTA