Posted by Matt on April 7, 2010 at 20:23
The other day I decided I was going to look into some of the new features for 1.2. I am in the middle of writing a site and decided that I may want to use some. Heres what I've been playing with;
- Multiple Databases
- Updated messages framework
- New template tags
Multiple Databases - Docs
In just a few lines of code and some playing around, I managed to have 1 of my database tables coming from another database. You might be wondering why this is useful, well, the best example I can think of at this stage is logging & stats. You could now setup 2 separate databases, with 2 different storage engines.. InnoDB for your content, and MyISAM to log views of the posts for example. Frequent updates the the database, even if you are just adding and the processing in the background later. MyISAM doesn't do consistency checking so inserts, defiantly when doing it a lot, is faster.
Updated messages framework - Docs
I havn't gone too far down this path yet, however the new features include message levels, DEBUG INFO, SUCCESS, WARNING, ERROR. I can now colour-code the messages I am presenting to my users without any sort of hack. Oh, and you can choose to store the data differently.
New template tags - Docs
There was a Django addon in the past which did several, if not all, of the new features, but now its included. New IF operators so we can now use ==, !=, >, <, <=, >= and in, not in as well chaining them.
Thanks so far Django development & contributors.
Something not officially part of Django, but after playing with it for a bit I believe should be, is the Django debug toolbar, which has evolved into a sidebar. Developers site and the github page. It's well worth an install, and although it is part of this post, I may in future write some more on it.
Comments