From: Kriti Godey Date: Thu, 22 Apr 2010 18:48:18 +0000 (-0400) Subject: Updated redirects. X-Git-Url: http://git.ithinksw.org/~kgodey/maayanwich.git/commitdiff_plain/606c841e4c0c6d01a8aa1110dee4145855f3324f Updated redirects. --- diff --git a/templates/loggedin.html b/templates/loggedin.html index 034852d..d46c57e 100644 --- a/templates/loggedin.html +++ b/templates/loggedin.html @@ -1,3 +1,5 @@ +{% block title %}ERROR!{% endblock %} + {% extends "base.html" %} {% block content %} diff --git a/templates/nopermission.html b/templates/nopermission.html new file mode 100644 index 0000000..4305b4a --- /dev/null +++ b/templates/nopermission.html @@ -0,0 +1,7 @@ +{% block title %}ERROR!{% endblock %} + +{% extends "base.html" %} + +{% block content %} +

You do not have permission to perform this action!

+{% endblock %} \ No newline at end of file diff --git a/templates/notloggedin.html b/templates/notloggedin.html index 15d9bb8..4fae865 100644 --- a/templates/notloggedin.html +++ b/templates/notloggedin.html @@ -1,3 +1,5 @@ +{% block title %}ERROR!{% endblock %} + {% extends "base.html" %} {% block content %} diff --git a/views.py b/views.py index e3912c2..b5d68ff 100644 --- a/views.py +++ b/views.py @@ -57,7 +57,7 @@ def edit_sandwich(request, slug): sedit = Sandwich.objects.get(slug=slug) ingred = sedit.ingredients.all() if not sedit.user == request.user: - return HttpResponseRedirect(reverse('all_sandwiches')) + return render_to_response('nopermission.html', context_instance=RequestContext(request)) else: if request.method == 'POST': sform = SandwichForm(request.POST, request.FILES, instance=sedit)