Change the deprecated direct_to_template to render.

This pull request removes the use of the deprecated direct_to_template on Django 1.5 and switches to the use of render.