Replace deprecated .iteritems() with .items().
Replace render_to_response() with simpler render().
Use django.shortcuts.redirect().