aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Kieran Siek <[email protected]>2020-07-15 10:36:38 +0800
committerGravatar GitHub <[email protected]>2020-07-15 10:36:38 +0800
commit183533240fd74575bda1274c0ea426e693549060 (patch)
treeedbaec8a7119e4d5aaf4c9ce0a1cce11e2f6cbed /pydis_site
parentCatch ConnectionError when trying to get updated repository data (diff)
parentFix linting issues caused by refactor. (diff)
Merge pull request #368 from python-discord/remove_django_crispy_bulma
Removes django-crispy-bulma as a dependency.
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/home/forms/account_deletion.py14
-rw-r--r--pydis_site/settings.py16
-rw-r--r--pydis_site/templates/home/account/delete.html9
3 files changed, 8 insertions, 31 deletions
diff --git a/pydis_site/apps/home/forms/account_deletion.py b/pydis_site/apps/home/forms/account_deletion.py
index 17ffe5c1..eec70bea 100644
--- a/pydis_site/apps/home/forms/account_deletion.py
+++ b/pydis_site/apps/home/forms/account_deletion.py
@@ -1,23 +1,9 @@
-from crispy_forms.helper import FormHelper
-from crispy_forms.layout import Layout
from django.forms import CharField, Form
-from django_crispy_bulma.layout import IconField, Submit
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"))
-
- self.helper.layout = Layout(
- IconField("username", icon_prepend="user")
- )
-
username = CharField(
label="Username",
required=True
diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index 5f80a414..2c87007c 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -52,6 +52,8 @@ if DEBUG:
'api.pythondiscord.local',
'admin.pythondiscord.local',
'staff.pythondiscord.local',
+ '0.0.0.0', # noqa: S104
+ 'localhost',
'web',
'api.web',
'admin.web',
@@ -104,8 +106,6 @@ INSTALLED_APPS = [
'allauth.socialaccount.providers.discord',
'allauth.socialaccount.providers.github',
- 'crispy_forms',
- 'django_crispy_bulma',
'django_hosts',
'django_filters',
'django_nyt.apps.DjangoNytConfig',
@@ -288,7 +288,6 @@ LOGGING = {
}
# Django Messages framework config
-
MESSAGE_TAGS = {
messages.DEBUG: 'primary',
messages.INFO: 'info',
@@ -297,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>