We currently have an inventory system for our employees. It contains laptops, phones, but also ergonomic chairs, fridges or software licenses ... So very different stuff that admins can create/read/ update/delete.
After doing a version completely based on admin interface, I gave up cause it didn't provide enough flexibility. So I rolled-up a complete custom version, but there is far too much code to my taste ... it's a pain to maintain.
Some of the problems I have been facing include :
allowing the admins to add their own item types through an interface, e.g. : laptop, TV, ... so basically like if they could create Django models themselves with a set of attributes through an interface. Also item types are hierarchical, e.g. TV and Laptop are subclasses of ElectronicItem, which in turn is a subclass of Item, ...
polymorphism : when listing all the items, they should be aware of what type they are, this in order to search/filter the list with javascript and also generate urls to the item detailed view.
updating some attributes through Ajax, e.g. laptops have licenses. On a laptop detail page, I have a javascript "manager", to associate/detach licenses to that laptop.
So I was wondering if anybody had a suggestion on what to use ! I especially wonder if one of the django CMSes apps could help me, because that does sound like functionalities a CMS could provide ! I was even thinking of a NOSql database ... but those sound like complicated solutions.
It is actually not the first time I am facing this problem of polymorphism with Django, and I still haven't found a good solution. So I kind of hope, their is something that I have completely missed, and that somebody can show me the light !!!
See Question&Answers more detail:os