Source

django-output-validator / output_validator / views.py

Diff from to

File output_validator/views.py

+from django.core.urlresolvers import reverse
 from django.http import HttpResponseRedirect
 
 from output_validator.models import ValidationFailure
                     except ValidationFailure.DoesNotExist:
                         pass
 
-    return HttpResponseRedirect("../")
+    return HttpResponseRedirect(reverse('output_validator.list'))
 
 
-def delete(request, object_id):
+def delete(request, pk):
     if request.POST:
         try:
-            vf = ValidationFailure.objects.get(id=object_id)
+            vf = ValidationFailure.objects.get(pk=pk)
             vf.delete()
         except ValidationFailure.DoesNotExist:
             pass
-    return HttpResponseRedirect("../../")
+    return HttpResponseRedirect(reverse('output_validator.list'))