diff options
Diffstat (limited to '')
| -rw-r--r-- | Pipfile | 1 | ||||
| -rw-r--r-- | Pipfile.lock | 10 | ||||
| -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 | 
5 files changed, 7 insertions, 40 deletions
| @@ -5,7 +5,6 @@ verify_ssl = true  [packages]  django = "~=2.2.13" -django-crispy-forms = "~=1.7.2"  django-environ = "~=0.4.5"  django-filter = "~=2.1.0"  django-hosts = "~=3.0" diff --git a/Pipfile.lock b/Pipfile.lock index 3d35f4c3..3166b224 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@  {      "_meta": {          "hash": { -            "sha256": "809dbb7f9b5383ead59aa1706b755eb60149cc9c1160c8516f2d4f54a193a482" +            "sha256": "009be40262ffc13460a05cefe0e66c41c4c14ed9ea7aca9854ae7bddeeba5da9"          },          "pipfile-spec": 6,          "requires": { @@ -65,14 +65,6 @@              ],              "version": "==1.0.0"          }, -        "django-crispy-forms": { -            "hashes": [ -                "sha256:5952bab971110d0b86c278132dae0aa095beee8f723e625c3d3fa28888f1675f", -                "sha256:705ededc554ad8736157c666681165fe22ead2dec0d5446d65fc9dd976a5a876" -            ], -            "index": "pypi", -            "version": "==1.7.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 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> | 
