Commit 7636be4d authored by Aymeric's avatar Aymeric

add home view

parent d34b8b67
......@@ -26,7 +26,7 @@
</div>
{% else %}
<a class="btn btn-success" href="{% url 'admin' %}">Se connecter</a>
<a class="btn btn-success" href="">Se connecter</a>
{% endif %}
</nav>
......
......@@ -3,31 +3,64 @@
{% block content %}
<div class="container text-center">
<div class="container-fluid">
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Bonjour Monsieur Hive,</h1>
<p class="lead">Bienvenue sur votre espace.</p>
</div>
</div>
<div class="row">
<div class="col">
<a href="https://www.w3schools.com">
<div class="card mx-auto" style="width: 18rem; height:10rem;">
<div class="jumbotron mt-5 bg-light">
<h1 class="display-4">Bienvenue sur PyPrevention !</h1>
<p class="lead">L'application de [...]</p>
<img class="card-img-top" src="https://www.cadredesante.com/spip/local/cache-vignettes/L379xH251/hopital-dessin-g-7f972.jpg" alt="Card image cap">
{% if user.is_authenticated %}
<a class="btn btn-lg btn-info" href="">Mon profil</a>
{% endif %}
<div class="card-body">
<h5 class="card-title">Mes patients</h5>
</div>
</div>
</a>
</div>
<div class="col">
<a href="https://www.w3schools.com">
<div class="card mx-auto" style="width: 18rem; height:10rem;">
{% if user.is_authenticated %}
<img class="card-img-top" src="https://www.cadredesante.com/spip/local/cache-vignettes/L379xH251/hopital-dessin-g-7f972.jpg" alt="Card image cap">
<div class="jumbotron mt-2 bg-light">
<div class="container">
<h3 class="display-6">{{ user.username}}</h3>
</div>
<div class="card-body">
<h5 class="card-title">Mes patients</h5>
</div>
</div>
</a>
</div>
<div class="col">
<a href="https://www.w3schools.com">
<div class="card mx-auto" style="width: 18rem; height:10rem;">
{% else %}
<img class="card-img-top" src="https://www.cadredesante.com/spip/local/cache-vignettes/L379xH251/hopital-dessin-g-7f972.jpg" alt="Card image cap">
<a class="btn btn-lg btn-success" href="{% url 'login' %}">Se connecter</a>
<div class="card-body">
<h5 class="card-title">Mes patients</h5>
</div>
</div>
</a>
</div>
<div class="col">
<a href="https://www.w3schools.com">
<div class="card mx-auto" style="width: 18rem; height:10rem;">
{% endif %}
<img class="card-img-top" src="https://www.cadredesante.com/spip/local/cache-vignettes/L379xH251/hopital-dessin-g-7f972.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Mes patients</h5>
</div>
</div>
</a>
</div>
</div>
</div>
{% endblock %}
......@@ -8,4 +8,5 @@ urlpatterns = [
path('api', views.api, name='api'),
path('logout', views.logout_view, name='logout'),
url(r'^accounts/login/$', views.login, name='login'),
url(r'^home/$', views.home, name='home'),
]
......@@ -10,7 +10,7 @@ def logout_view(request):
return redirect('/')
def index(request):
return render(request, 'home.html')
return render(request, 'index.html')
@login_required
def api(request):
......@@ -18,3 +18,7 @@ def api(request):
def login(request):
return render(request, 'login.html')
def home(request):
return render(request, 'home.html')
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