add form of selection

This commit is contained in:
Alejandro Diaz 2023-09-12 15:51:16 -06:00
parent 6d138ed9b7
commit 93be13ccd1
12 changed files with 92 additions and 13 deletions

View file

@ -22,9 +22,10 @@
<nav class="navbar navbar-expand-md navbar-light " style="background-color: #f0f5f5">
{% if user.is_authenticated %}
<a class="navbar-brand">Welcome {{ user.username }}</a>
<a href="{% url 'logout' %}" class="navbar-brand">Log Out</a>
{% else %}
<a class="navbar-brand">Log In</a>
<a class="navbar-brand"></a>
{% endif %}
</nav>
<!--Any flash messages pop up in any page because this is the base template-->

View file

@ -2,12 +2,35 @@
{% block title %} Home Manager {% endblock title%}
{% block content %}
<style>
img {
max-width: 100%;
object-fit: cover;
}
</style>
{% if user.is_authenticated %}
<div class="jumbotron">
<h1 class="display-4">Welcome {{ user.username }}</h1>
<div class="jumbotron">
<form action="" method="post">
{% csrf_token %}
<ul class="list-group">
{{ form.as_ul }}
</ul>
<input class="btn btn-primary btn-lg" type="submit" value="Enable">
</form>
</div>
<div class="jumbotron">
{% load static %}
<img src="{% static image %}" alt="My image">
</div>
{% else %}
<p>You are not logged in</p>
<a href="{% url 'login' %}">Log In</a>
<div class="jumbotron">
<p class="lead">You are not logged in</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="{% url 'login' %}" role="button">Log In</a>
</p>
</div>
{% endif %}
{% endblock content %}