I got a situation when some part of data stored in database so there is no problems to handle it with django admin. But some data stored in few fi开发者_运维百科les on filesystem and i need to parse and show them (no need to have all CRUD operations here, only listing)
I have a way to build custom admin but i prefer to do that with standard django admin. So is there any way where i can list data in django admin that stored not in database?
Taking some inspiraton from Eric Holscher's recent post, you could create a model just to keep track of some metadata for the files, and use that to list the files in the admin.
class ImportedFile(models.Model):
name = models.CharField(max_length=255)
path = models.CharField(max_length=255)
精彩评论