Use django's SortedDict instead of collections.OrderedDict.
Make TEMPLATE_DIRS absolute paths.
Merge pull request #365 from mdebbar/fix_for_host

Few fixes to make the code work in different environment with Python 2.6