Looking for some advice on how to handle my little problem, all help gratefully appreciated.
Apologies it's quite long. Story thus: I need to build an application for holding a simple inventory of components in the IT estate: servers, applications, network switches, etc. They all have a core set of common attributes (e.g. identifier), while there are also attributes specific to the class of node (e.g. IP address for hardware devices). A classic case for subtyping; except (1) it's not yet supported, and (2) the list of types needs to be extensible at run time. So I have a 5 class model: component, component type, property, property type, and value. Components are modelled as instances of component type (i.e. each component is instance of exactly 1 component type). Each Component type defines 0 or more properties; each property is of exactly one property type. Each component has a value for each property defined by its component type. (Hope that makes sense, it's a lot easier as a picture). This all works fine, except of course adding components in the admin interface is not intuitive at all (since their properties are shown on separate pages). Now the pattern I have is basically the same as the model for data models (table has many columns, each of a type; row has value for each column). So in a sense I'm repeating a pattern already known to Django. Which circuitously brings me to the questions: - is there a way to get the admin interface to generate a page with fields for all the right component fields depending on its type? - I'd like to use the django field types as my property types - can I query this list programmatically? Apologies for long post, thanks for any help. - S. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---