aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Pipfile2
-rw-r--r--Pipfile.lock14
-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
5 files changed, 9 insertions, 46 deletions
diff --git a/Pipfile b/Pipfile
index 6c99b995..0f794078 100644
--- a/Pipfile
+++ b/Pipfile
@@ -5,7 +5,6 @@ verify_ssl = true
[packages]
django = "~=3.0.4"
-django-crispy-forms = "~=1.9.0"
django-environ = "~=0.4.5"
django-filter = "~=2.1.0"
django-hosts = "~=4.0"
@@ -13,7 +12,6 @@ djangorestframework = "~=3.11.0"
djangorestframework-bulk = "~=0.2.1"
psycopg2-binary = "~=2.8"
django-simple-bulma = "~=1.2"
-django-crispy-bulma = {git = "https://github.com/python-discord/django-crispy-bulma.git", ref = "0.3"}
whitenoise = "~=5.0"
requests = "~=2.21"
pygments = "~=2.3.1"
diff --git a/Pipfile.lock b/Pipfile.lock
index f3e4565b..097c4f81 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "a9a46956f5519f67344309a42bf24adc3b33a19363d0c5a73ba79273d1029f9c"
+ "sha256": "edc59f1c711954bd22606d68e00f44c21c68a7b3193b20e44a86438e24c0f54b"
},
"pipfile-spec": 6,
"requires": {
@@ -75,18 +75,6 @@
],
"version": "==1.0.0"
},
- "django-crispy-bulma": {
- "git": "https://github.com/python-discord/django-crispy-bulma.git",
- "ref": "c741d399b2eaf08865cba6880cee851c9c9a7ece"
- },
- "django-crispy-forms": {
- "hashes": [
- "sha256:888bb316db89b60050a42ec35080facb361d823eec38010ccb0702f45642d3b8",
- "sha256:f2f1e0fbb458851636447cfb6be1a611b40c8ac9e41a74ba923011378670b43b"
- ],
- "index": "pypi",
- "version": "==1.9.2"
- },
"django-environ": {
"hashes": [
"sha256:6c9d87660142608f63ec7d5ce5564c49b603ea8ff25da595fd6098f6dc82afde",
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>