Re: FileField Model Required

2020-08-14 Thread cyril....@gmail.com
The solution I have found is overriding the save function from the model class: class FileUpload(models.Model): owner = models.CharField(max_length=200,blank=False, null=False) record = models.FileField(upload_to=path_and_rename) def save(self, force_insert=False, force_update=False, *args, **kw

FileField Model Required

2020-08-14 Thread cyril....@gmail.com
Hi, Is it possible to mark a FileField in my model as required My model looks like : class FileUpload(models.Model): owner = models.CharField(max_length=200,blank=False, null=False) record = models.FileField(upload_to=path_and_rename,blank=False, null=False) 1st statement : According to what i h