From 99ba39413e2d3d4231ab27f2ecfa8a88da0545c8 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 15 Mar 2021 10:05:08 -0700 Subject: [PATCH] Fixes upload and display of logos in admin panel --- bookwyrm/templates/settings/site.html | 2 +- bookwyrm/templates/snippets/about.html | 2 +- bookwyrm/views/site.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/settings/site.html b/bookwyrm/templates/settings/site.html index 2e43bb74d..27be0c9b2 100644 --- a/bookwyrm/templates/settings/site.html +++ b/bookwyrm/templates/settings/site.html @@ -7,7 +7,7 @@ {% block panel %} -
+ {% csrf_token %}

{% trans "Instance Info" %}

diff --git a/bookwyrm/templates/snippets/about.html b/bookwyrm/templates/snippets/about.html index aad5d5dee..820fb5759 100644 --- a/bookwyrm/templates/snippets/about.html +++ b/bookwyrm/templates/snippets/about.html @@ -1,7 +1,7 @@
- BookWyrm logo + BookWyrm logo
diff --git a/bookwyrm/views/site.py b/bookwyrm/views/site.py index c40a9e760..ce64e6e0f 100644 --- a/bookwyrm/views/site.py +++ b/bookwyrm/views/site.py @@ -26,7 +26,7 @@ class Site(View): def post(self, request): """ edit the site settings """ site = models.SiteSettings.objects.get() - form = forms.SiteForm(request.POST, instance=site) + form = forms.SiteForm(request.POST, request.FILES, instance=site) if not form.is_valid(): data = {"site_form": form} return TemplateResponse(request, "settings/site.html", data)