def change_view(self, request, object_id, extra_context=None): result = super(TodoAdmin, self).change_view(request, object_id, extra_context) if not request.POST.has_key('_addanother') and not request.POST.has_key('_continue'): result['Location'] = "/" return result