Added form for users to delete their accounts.

Closes #10
This commit is contained in:
Johannes Erwerle 2026-10-02 20:32:37 +02:00
parent 16fe53cd32
commit dc0149560c
6 changed files with 76 additions and 1 deletions

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
{% block content %}
{% if next %}
{% if user.is_authenticated %}
<p>Your account doesn't have access to this page. To proceed,
please login with an account that has access.</p>
{% else %}
<p>Please login to see this page.</p>
{% endif %}
{% endif %}
<form method="post" action="{% url 'delete' %}">
{% csrf_token %}
{{ form|crispy }}
<input class="button is-danger" type="submit" value="Delete Account">
<input type="hidden" name="next" value="{{ next }}">
</form>
{% endblock %}