Merge branch 'main' into production

This commit is contained in:
Mouse Reeve 2021-03-15 10:29:29 -07:00
commit 52cf9c67b9
3 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
{% block panel %}
<form action="{% url 'settings-site' %}" method="POST" class="content">
<form action="{% url 'settings-site' %}" method="POST" class="content" enctype="multipart/form-data">
{% csrf_token %}
<section class="block" id="instance-info">
<h2 class="title is-4">{% trans "Instance Info" %}</h2>

View file

@ -1,7 +1,7 @@
<div class="columns">
<div class="column is-narrow is-hidden-mobile">
<figure class="block">
<img src="{% if site.logo_small %}/images/{{ site.logo }}{% else %}/static/images/logo.png{% endif %}" alt="BookWyrm logo">
<img src="{% if site.logo %}/images/{{ site.logo }}{% else %}/static/images/logo.png{% endif %}" alt="BookWyrm logo">
</figure>
</div>
<div class="content">

View file

@ -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)