how to attach file to sepecific object

52 views
Skip to first unread message

Muhammad Dilshad Khaliq

unread,
Dec 18, 2018, 5:41:48 AM12/18/18
to django-filer
I have Orderdetail model in django. i want to attach multiple file with with each instance. I have following code.
class OrderDetail(models.Model):
company_name = models.CharField(max_length=100, blank=True, null=True)
created = models.DateTimeField(auto_now_add=True)
file = FilerFileField(on_delete=models.CASCADE, null=True, blank=True, related_name='sample_file')

and for admin.py 

@admin.register(OrderDetail)
class OrderDetailAdmin(admin.ModelAdmin):
      fieldsets = (
('OrderDetail', {'fields': (company_name','created', 'file')}),
)


filer.PNG

its showing me some thing like this in orderdetial changepage but when i click upload file its pop with uploader window but from it does not pick file.Any one can help me.

Reply all
Reply to author
Forward
0 new messages