Add login to Base

parent b9458705
......@@ -19,13 +19,13 @@
</a>
<div class="dropdown-menu dropdown-menu-left" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="">Mon profile</a>
<a class="dropdown-item" href="{% url 'dashboard' %}">Mon dashboard</a>
<a class="dropdown-item text-danger" href="{% url 'logout' %}">Se déconnecter</a>
</div>
</div>
{% else %}
<a class="btn btn-success" href="">Se connecter</a>
<a class="btn btn-success" href="{% url 'login' %}">Se connecter</a>
{% endif %}
</nav>
......
......@@ -15,5 +15,7 @@ urlpatterns = [
path('doctors', views.doctors, name='doctors'),
path('patients', views.patients, name='patients'),
path('dashboard', views.dashboard, name='dashboard'),
url('login', views.login, name='login'),
]
......@@ -43,7 +43,7 @@ def api(request):
return HttpResponse("API")
def login(request):
return render(request, 'login.html')
return redirect('/admin/login')
def home(request):
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment