diff --git a/requirements/base.in b/requirements/base.in index 56bd2b7..4708fc6 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -23,7 +23,6 @@ sentry-sdk wagtail-favicon django-sri wagtail-2fa -django-fontawesome-6 # Pinned due to lack of Wagtail 3 support git+https://github.com/wagtail/wagtail-autocomplete@03f46a0c256989690d0a43fc21fe0f37f9ede765 diff --git a/requirements/base.txt b/requirements/base.txt index a8a9a66..9fd03c1 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -15,10 +15,9 @@ click==8.1.3 # via rq coreapi==2.3.3 # via drf-yasg coreschema==0.0.4 # via coreapi, drf-yasg deprecated==1.2.13 # via redis -django==4.0.6 # via -r requirements/base.in, django-filter, django-fontawesome-6, django-htmx, django-modelcluster, django-otp, django-permissionedforms, django-plausible, django-redis, django-rq, django-sri, django-taggit, django-treebeard, djangorestframework, drf-yasg, wagtail, wagtail-2fa +django==4.0.6 # via -r requirements/base.in, django-filter, django-htmx, django-modelcluster, django-otp, django-permissionedforms, django-plausible, django-redis, django-rq, django-sri, django-taggit, django-treebeard, djangorestframework, drf-yasg, wagtail, wagtail-2fa django-environ==0.9.0 # via -r requirements/base.in django-filter==21.1 # via wagtail -django-fontawesome-6==1.0.0.0 # via -r requirements/base.in django-htmx==1.12.1 # via -r requirements/base.in django-modelcluster==6.0 # via wagtail django-otp==1.1.3 # via wagtail-2fa diff --git a/requirements/dev.txt b/requirements/dev.txt index 34e6274..a775d19 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -20,12 +20,11 @@ coreschema==0.0.4 # via -r requirements/base.txt, coreapi, drf-yasg coverage==6.4.4 # via -r requirements/dev.in curlylint==0.13.1 # via -r requirements/dev.in deprecated==1.2.13 # via -r requirements/base.txt, redis -django==4.0.6 # via -r requirements/base.txt, django-browser-reload, django-debug-toolbar, django-filter, django-fontawesome-6, django-htmx, django-modelcluster, django-otp, django-permissionedforms, django-plausible, django-redis, django-rq, django-sri, django-taggit, django-treebeard, djangorestframework, drf-yasg, wagtail, wagtail-2fa +django==4.0.6 # via -r requirements/base.txt, django-browser-reload, django-debug-toolbar, django-filter, django-htmx, django-modelcluster, django-otp, django-permissionedforms, django-plausible, django-redis, django-rq, django-sri, django-taggit, django-treebeard, djangorestframework, drf-yasg, wagtail, wagtail-2fa django-browser-reload==1.6.0 # via -r requirements/dev.in django-debug-toolbar==3.5.0 # via -r requirements/dev.in django-environ==0.9.0 # via -r requirements/base.txt django-filter==21.1 # via -r requirements/base.txt, wagtail -django-fontawesome-6==1.0.0.0 # via -r requirements/base.txt django-htmx==1.12.1 # via -r requirements/base.txt django-modelcluster==6.0 # via -r requirements/base.txt, wagtail django-otp==1.1.3 # via -r requirements/base.txt, wagtail-2fa diff --git a/website/common/templates/common/footer.html b/website/common/templates/common/footer.html index f0c1233..069652a 100644 --- a/website/common/templates/common/footer.html +++ b/website/common/templates/common/footer.html @@ -5,7 +5,7 @@ {% if online_accounts %}

{% for online_account in online_accounts %} - {{ online_account.icon.as_html }} + {% endfor %}

{% endif %} diff --git a/website/contact/migrations/0007_onlineaccount_icon.py b/website/contact/migrations/0007_onlineaccount_icon.py index 9d3660e..0150351 100644 --- a/website/contact/migrations/0007_onlineaccount_icon.py +++ b/website/contact/migrations/0007_onlineaccount_icon.py @@ -1,7 +1,7 @@ -# Generated by Django 4.0.6 on 2022-09-02 07:38 +# Generated by Django 4.0.6 on 2022-09-02 14:17 -import fontawesome_6.fields -from django.db import migrations +import django.core.validators +from django.db import migrations, models class Migration(migrations.Migration): @@ -14,6 +14,10 @@ class Migration(migrations.Migration): migrations.AddField( model_name="onlineaccount", name="icon", - field=fontawesome_6.fields.IconField(blank=True, max_length=60), + field=models.CharField( + blank=True, + max_length=64, + validators=[django.core.validators.RegexValidator("[a-z-\\\\s]")], + ), ), ] diff --git a/website/contact/models.py b/website/contact/models.py index 037fe30..df4aeab 100644 --- a/website/contact/models.py +++ b/website/contact/models.py @@ -1,8 +1,8 @@ +from django.core.validators import RegexValidator from django.db import models from django.http.request import HttpRequest from django.utils.functional import cached_property from django.utils.text import slugify -from fontawesome_6.fields import IconField from wagtail.admin.panels import FieldPanel from wagtail.search import index from wagtail.snippets.models import register_snippet @@ -16,7 +16,9 @@ class OnlineAccount(models.Model, index.Indexed): name = models.CharField(max_length=64, unique=True) url = models.URLField() username = models.CharField(max_length=64) - icon = IconField() + icon = models.CharField( + max_length=64, blank=True, validators=[RegexValidator(r"[a-z-\\s]")] + ) panels = [ FieldPanel("name"), diff --git a/website/contact/templates/contact/contact_page.html b/website/contact/templates/contact/contact_page.html index 151dd11..5293958 100644 --- a/website/contact/templates/contact/contact_page.html +++ b/website/contact/templates/contact/contact_page.html @@ -7,7 +7,14 @@
diff --git a/website/settings.py b/website/settings.py index db57cce..dd19c2b 100644 --- a/website/settings.py +++ b/website/settings.py @@ -72,7 +72,6 @@ INSTALLED_APPS = [ "wagtail_2fa", "django_otp", "django_otp.plugins.otp_totp", - "fontawesome_6", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions",