11 May 2007 malcolm   » (Master)

Runtime Model Creation In Django (?!)

One of the nice things I like about hacking on Django is that the design lends itself to changing things without having to modify the core code. The internal pieces are split up pretty sensibly into different classes and functions so that you can override and subclass just the bits you need to. It's something that orients my internal design compass a lot when I'm looking at code additions.

Consequently, it's nice to see other people taking advantage of this. Along these lines, Marty Alchin's recent documenting of how to create models at runtime deserves some publicity.

I don't know that this is a particularly robust idea in general, but it clearly has its uses. Marty needs to do it for some reason. I guess with a bit of work and some robust database schema migration code underneath, you could create a web-based model design tool, for example. It's certainly a nice example of using the available hooks and reading the existing code to see how to extend the process.

Syndicated 2007-05-11 19:07:56 from Malcolm Tredinnick

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!