everyone. In my django I have 2 options:
I want to be list with admin/user always on the right, like in my second jpeg.
HTML:
<body>
<div class="container2">
<div class="butts">
<form action="{% url 'catalog:redir' %}" method="post">
<button class="butt" type="submit">
<p>
На главную
</p>
</button>
</form>
<div>
{% if author_list.1 %}
<div>
<form action="{% url 'catalog:author_delete' author_list.1.id %}" method="post">
<button class="butt" type="submit">
<p>
Новая раздача
</p>
</button>
</form>
</div>
</div>
</div>
{% endif %}
<div class="voted-users">
{% if author_list|length == 0 %}
<p>Игра не началась</p>
{% else %}
{% if voted_list %}
</ul>
{% else %}
<p>Непроголосовавшие пользователи</p>
<ul>
{% for i in user_list %}
<p> {{ i }} <p>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
</div>
</body>
CSS:
.butts {
display: flex;
align-items: flex-start;
justify-content: space-between;
flex-direction: column;
}
.butt {
display: flex;
align-items: center;
justify-content: center;
}
.container2 {
width: 100%;
display: flex;
align-items: flex-start;
justify-content: space-around;
}
The page is done using flexbox. Don't have any idea. It looks, like if my IF doesnt work my second div gets into first div (voted users into butts), but in the other case it doesnt happen