Update on database-backed settings

I’ve made a few updates recently to dbsettings, which finally brings the issue count to zero, and adds some new features worth discussing.

The biggest improvement is that it finally uses Django’s cache framework, so it’s able to work properly in multi-process setups. This was essential in order make the framework useful in production environments.

The one caveat is that two of Django’s cache backends aren’t suitable for this framework, and one of those two is actually the default. simple and locmem both store their data internally within a single process, meaning that any updates to your settings won’t be reflected in subsequent requests. All the other backends should work fine, so if you’re moving your app to a multi-process production environment, such as mod_python or FastCGI, make sure you specify a cache backend that’s capable of working properly with dbsettings.

The other significant improvement is the addition of a DecimalValue, allowing non-integer input, and the expansion of PercentValue to support non-integer values. These both use Django’s Decimal module as a fallback if your version of Python doesn’t support Decimal directly, so it should still work in all Python versions Django supports.

I had planned those changes from the beginning, but hadn’t gotten around to them, so Jonathan Buchanan kindly supplied the missing pieces, without even being asked! Things are really starting to shape up.

The last major component left unimplemented at this point is a comprehensive test suite. There’s a lot to test, so the suite will have be considerable. Now that the issue count is down to zero, I’ll have some more time to work on it, but if more issues come in, those will take priority.

Comments

  1. At 10:32 a.m. on Jul 17, 2007, Anonymous said ...

    Nice work, I really like dbsettings and would like to see it in django 1.0

  2. At 10 p.m. on Jul 31, 2007, Eric Florenzano said ...

    I'm trying to access the dbsettings google code page and it's giving me an error. Other google code pages are working for me...is there something being done on the administrative end of things for the google code page right now?

Speak up!


This particular article was posted on Monday, July 16, 2007, and has received 2 comments.

It was preceeded by The Economy of VGMix and followed by Dynamic models in the real world.

It contains the following links:

Archive

Categories

Powered by Django.