Django templates improvements