Modified to use Django template tags.