This was deprecated in 4.1 and removed in 5.0. I missed it.
[1] https://docs.djangoproject.com/en/5.0/releases/4.1/#features-deprecated-in-4-1
Signed-off-by: Stephen Finucane <stephen@that.guru>
(cherry picked from commit
45f47e96c6c90aefac37b02e0e15052f6ba41a90)
color: #999;
}
+ul.dropdown-menu > li > form {
+ display: block;
+ width: 100%;
+}
+
+ul.dropdown-menu > li > form > button {
+ /* taken from bootstrap's styling for '.dropdown-menu > li > a' */
+ background: none;
+ border: none;
+ cursor: pointer;
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: 400;
+ line-height: 1.42857143;
+ color: #333;
+ white-space: nowrap;
+ width: 100%;
+ text-align: left;
+}
+
+ul.dropdown-menu > li > form > button:hover {
+ /* taken from bootstrap's styling for '.dropdown-menu > li > a:hover' */
+ color: #262626;
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+
form {
padding: 0em;
margin: 0em;
<li><a href="{% url 'admin:index' %}">Administration</a></li>
{% endif %}
<li><a href="{% url 'user-profile' %}">View profile</a></li>
- <li><a href="{% url 'auth_logout' %}">Logout</a></li>
+ <li>
+ <form id="logout-form" method="post" action="{% url 'auth_logout' %}">
+ {% csrf_token %}
+ <button type="submit">Logout</button>
+ </form>
+ </li>
</ul>
</li>
{% else %}