Using Django to manage XML configuration file

We're using Django to mange a set of XML configuration files through the django-admin interface.

Currently, I'm converting the XML values/hierarchies into Django models.

After this, we also need to code an import - to import in configuration files and populate Django models based on them, and also an export, to export from our Django models back into the finished XML configuration files.

However, another way might be just to inspect the XSD files for the XML files, and try to create the models from that.

I know there's django-models-schemas (, that is meant to generate XSD files from Django models. I'm not aware of anything going the other way (introspecting XSD files to get Django models). GenerateDS is the nearest match I can find, but it doesn't really solve our problem of converting cleanly to Django models at runtime.

The other issue is that the configuration XML format will change quite a bit - so ideally, reading directly from the XSD file would be good, if that's at all possible.

What's the best way of achieving this?

Alternately, is there an easier way of achieving the main goal - editing XMl configuration files through a Django interface? Anything else I should bear in mind?

Cheers, Victor


I think I was in a similar problem with AIML (XML) files until I found this: Now I don't need to duplicate data in XML and database. Hope it helps :)

Need Your Help

Split an NSString

iphone objective-c cocoa nsstring nsobject

Quick question. I need to split an NSString, if it contains a certain substring. Can someone show me an example of how to do this?

fcgi, ssl and django, redirect HTTP to HTTPS

django redirect https lighttpd fastcgi

I have a django site setup with lighttpd and ssl working but I can not seem to get a redirect to work from http to https. My setup is very similar to: