mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
no_perm
This commit is contained in:
@@ -110,7 +110,8 @@ def no_space(request):
|
||||
|
||||
def no_perm(request):
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
messages.add_message(request, messages.ERROR, _('You are not logged in and therefore cannot view this page!'))
|
||||
return HttpResponseRedirect(reverse('account_login') + '?next=' + request.GET.get('next', '/search/'))
|
||||
return render(request, 'no_perm_info.html')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user