From 11503b660d2a4249edde02a50889ebae270f07f4 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Wed, 15 Jul 2020 00:06:25 +0200 Subject: Removes django_crispy_forms dependency, too. --- pydis_site/apps/home/forms/account_deletion.py | 14 -------------- pydis_site/settings.py | 13 ------------- pydis_site/templates/home/account/delete.html | 9 ++++++--- 3 files changed, 6 insertions(+), 30 deletions(-) (limited to 'pydis_site') diff --git a/pydis_site/apps/home/forms/account_deletion.py b/pydis_site/apps/home/forms/account_deletion.py index 9498a341..b2160657 100644 --- a/pydis_site/apps/home/forms/account_deletion.py +++ b/pydis_site/apps/home/forms/account_deletion.py @@ -1,22 +1,8 @@ -from crispy_forms.helper import FormHelper -from crispy_forms.layout import Layout, Submit, Field from django.forms import CharField, Form class AccountDeletionForm(Form): """Account deletion form, to collect username for confirmation of removal.""" - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.helper = FormHelper() - - self.helper.form_method = "post" - self.helper.add_input(Submit("submit", "I understand, delete my account", css_class='button is-primary')) - - self.helper.layout = Layout( - Field("username") - ) - username = CharField( label="Username", required=True diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 4487a9d3..206bec7d 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -106,7 +106,6 @@ INSTALLED_APPS = [ 'allauth.socialaccount.providers.discord', 'allauth.socialaccount.providers.github', - 'crispy_forms', 'django_hosts', 'django_filters', 'django_nyt.apps.DjangoNytConfig', @@ -289,7 +288,6 @@ LOGGING = { } # Django Messages framework config - MESSAGE_TAGS = { messages.DEBUG: 'primary', messages.INFO: 'info', @@ -298,17 +296,6 @@ MESSAGE_TAGS = { messages.ERROR: 'danger', } -# Custom settings for Crispyforms -CRISPY_ALLOWED_TEMPLATE_PACKS = ( - "bootstrap", - "uni_form", - "bootstrap3", - "bootstrap4", - "bulma", -) - -CRISPY_TEMPLATE_PACK = "bulma" - # Custom settings for django-simple-bulma BULMA_SETTINGS = { "variables": { # If you update these colours, please update the notification.css file diff --git a/pydis_site/templates/home/account/delete.html b/pydis_site/templates/home/account/delete.html index 1020a82b..0d44e32a 100644 --- a/pydis_site/templates/home/account/delete.html +++ b/pydis_site/templates/home/account/delete.html @@ -1,6 +1,4 @@ {% extends 'base/base.html' %} - -{% load crispy_forms_tags %} {% load static %} {% block title %}Delete Account{% endblock %} @@ -36,7 +34,12 @@
- {% crispy form %} +
+ {% csrf_token %} + + + +
-- cgit v1.2.3