mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
sligthly improved login redirects
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'account_logout' %}">{% trans 'Login' %} <i class="fas fa-sign-in-alt"></i></a>
|
||||
<a class="nav-link" href="{% url 'account_login' %}">{% trans 'Login' %} <i class="fas fa-sign-in-alt"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@@ -94,6 +94,8 @@ def no_space(request):
|
||||
|
||||
|
||||
def no_perm(request):
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
return render(request, 'no_perm_info.html')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user