So I have a model with a FileField, I just need to know how to upload more files on the same FileField. I don't want to create other model or other FileField. This is my code :
file = models.FileField(blank=True, upload_to='documents')
def file_link(self):
if self.file:
return "<a href='%s'>download</a>" % (self.file.url,)
else:
return "No attachment"
file_link.allow_tags = True
[edit by admin: best guess at formatting]