diff options
author | 2020-07-15 00:06:25 +0200 | |
---|---|---|
committer | 2020-07-15 00:06:25 +0200 | |
commit | 11503b660d2a4249edde02a50889ebae270f07f4 (patch) | |
tree | 084e669334711b8d25776996fda71af9c7ef3219 /pydis_site | |
parent | Removes django_crispy_bulma dependency. (diff) |
Removes django_crispy_forms dependency, too.
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/home/forms/account_deletion.py | 14 | ||||
-rw-r--r-- | pydis_site/settings.py | 13 | ||||
-rw-r--r-- | pydis_site/templates/home/account/delete.html | 9 |
3 files changed, 6 insertions, 30 deletions
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 @@ <div class="columns is-centered"> <div class="column is-half-desktop is-full-tablet is-full-mobile"> - {% crispy form %} + <form method="post"> + {% csrf_token %} + <label for="id_username" class="label requiredField">Username</label> + <input id="id_username" class="input" type="text" required name="username"> + <input style="margin-top: 1em;" type="submit" value="I understand, delete my account" class="button is-primary"> + </form> </div> </div> </div> |