From 6604aa9d11421b3bcf6003f172eb35820f889a60 Mon Sep 17 00:00:00 2001 From: Retspen Date: Thu, 26 Mar 2015 16:03:12 +0200 Subject: [PATCH] Fixed refer from logs to accouts admin --- accounts/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accounts/views.py b/accounts/views.py index b222f20..b50c97d 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -121,6 +121,9 @@ def account(request, user_id): user_insts = UserInstance.objects.filter(user_id=user_id) instances = Instance.objects.all() + if user.username == request.user.username: + return HttpResponseRedirect(reverse('profile')) + if request.method == 'POST': if 'delete' in request.POST: user_inst = request.POST.get('user_inst', '')