Fix user dropdown and add logout view
This commit is contained in:
parent
800318c271
commit
8d7837b890
@ -2,14 +2,15 @@
|
|||||||
{% block 'navbar-right' %}
|
{% block 'navbar-right' %}
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<ul class="nav navbar-nav ml-auto">
|
<ul class="nav navbar-nav ml-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
{{ request.user.username }}
|
<span class="fas fa-user"></span> {{ request.user.username }}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
|
||||||
<a class="dropdown-item" href="#">Profile</a>
|
<a class="dropdown-item" href="#">Profile</a>
|
||||||
<a class="dropdown-item" href="#">Settings</a>
|
<a class="dropdown-item" href="#">Settings</a>
|
||||||
<a class="dropdown-item" href="#">Upload module</a>
|
<a class="dropdown-item" href="#">Upload module</a>
|
||||||
|
<a class="dropdown-item" href="{% url 'logout' %}">Logout</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -22,5 +22,5 @@ urlpatterns = [
|
|||||||
path('', TemplateView.as_view(template_name='store/index.html'), name='store_front_page'),
|
path('', TemplateView.as_view(template_name='store/index.html'), name='store_front_page'),
|
||||||
path('login/', views.CustomLoginView.as_view(), name='login'),
|
path('login/', views.CustomLoginView.as_view(), name='login'),
|
||||||
path('signup/', views.SignUpView.as_view(), name='signup'),
|
path('signup/', views.SignUpView.as_view(), name='signup'),
|
||||||
path('logout/', LogoutView.as_view())
|
path('logout/', LogoutView.as_view(), name='logout')
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user