learningequality/ka-lite — pull request #57 by bcipolli (2013-04-29 19:40:05+00:00)
Title: Changing settings via Django admin interface

I've set up settings.py to pull from the config_settings database table (and push the hardcoded if values aren't there already). This will allow people to admin some of the server settings (particularly, the file path to the videos) through the Django admin interface, which should be a bit easier.

I've also made as much of the code run through config.models.Settings, instead of settings.

Finally, I've implemented a local settings cache in config.models, such that it only goes to the DB when the setting hasn't previously been read into memory (to avoid performance bottlenecks due to DB access). Note that, because the admin interface does NOT use config.models.Settings.set, changes through the admin interface require a server restart at the moment. Not sure if there's a good way to get around this.

One last note: I accidentally included URL changes, to shift from old URLs (google site wiki, kalite.adhocsync.com) to new URLs (kalitewiki.learningequality.org and kalite.learningequality.org), except for ONE: the CENTRAL_SERVER_HOSTNAME, which has to remain at kalite.adhocsync.com (because API calls to kalite.learningequality.org fail as we only have a SSL certificate for kalite.adhocsync.com)