Improvements to Django project template for 1.5 compatibility.