You might take a look at my writeup on dynamic models,[1] which specifically covers a way to specify Django models in a database, which can be changed at run-time. However, I haven't looked at what it would take to actually commit changes to the already-synced tables. I have a feeling Django Evolution[2] will help with this, but I haven't done any testing with it yet.
-Gul [1] http://code.djangoproject.com/wiki/DynamicModels [2] http://code.google.com/p/django-evolution/ On 12/5/07, DeliciousPy <[EMAIL PROTECTED]> wrote: > > I'm thinking of trying to start making a CRM/ERP system, I had just > started working on an inventory app, when I ran into a problem. > > I want to be able to change the definition of an existing class (and > the associated parts of the DB) during runtime, from a web interface. > > > I'll describe the model I want to implement... > Say I have three classes: Item, Item Type, (and possibly) Item Field > > Items would consist of an item type, and item fields (separate from > the so-named classes) > > Item types would specify groups of item fields shown in item records > (instances of the item class), and would also specify how the fields > interacted with other parts of the database (ie accounting, sales, > etc) > > Item fields would consists of a field name, a field type and a > description of the field. This class might not be necessary, depending > on how this would be implemented. > > Another requirement is the ability to have "complex fields" that is, > small collections of fields that go together, like a boolean field > (represented by a checkbox) used to specify if a partner charfield > should do one thing or another. > > > One way I was thinking of doing this would involve a view that would > invoke a script that writes django code to do the dirty work of > inserting stuff into models.py files and updating the db > appropriately. I feel like there might be a better way, or perhaps > something that does this already... > > > So my questions are: > > Are there currently any existing methods of doing this kind of thing > with Django (or something built for this purpose), and if not, what > are your thoughts on how I should proceed? > > > --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---