How to use multiple model instances in views in django? -
i have created website when user upload image, detect objects on image , show them. here model: class document(models.model): docfile = models.filefield(upload_to='documents/%y/%m/%d') imgfile = models.filefield(upload_to='documents/%y/%m/%d',default='settings.media_root/default/default.jpg') catagory = models.charfield(max_length=100,default="unknow") the docfile original image, imgfile image label object in image, catagory category of object. my problem there might multiple objects in image, might have multiple document instances in views, don't know how many instances need in advance because depends on detection results. so how can implement this? , if can use document list in views, how can show contents in list in html template? thx. you can change models little: class baseimage(models.model): docfile = models.filefield(upload_to='documents/%y/%m/%d') class document(models.model): base_image =...