skip to content

Logout

Django uses HTTP POST for logging users out. This generally a good idea because browsers can 'pre-fetch' links on pages, or malicious actors could log users out using XSS attacks on other sites.

However, from a user's point of view, 'log out' should look the same as 'log in'. We use links for logging in (the link goes to a login form), so for consistency we want the logout button to look the same.

Light theme

Dark theme

Invoke the dark theme on any component by applying class="ds-dark" to a container element.

<form class="ds-logout">
    <button type="submit">Logout</button>
</form>

In a header

A ds-logout can be used inside a list element in the header component.

Light theme

Dark theme

Invoke the dark theme on any component by applying class="ds-dark" to a container element.