diff --git a/bookwyrm/templates/settings/site.html b/bookwyrm/templates/settings/site.html index 8efad308..2ecd988e 100644 --- a/bookwyrm/templates/settings/site.html +++ b/bookwyrm/templates/settings/site.html @@ -15,6 +15,24 @@ {% endblock %} {% block panel %} +{% if success %} +
+ + + {% trans "Settings saved" %} + +
+{% endif %} + +{% if site_form.errors %} +
+ + + {% trans "Unable to save settings" %} + +
+{% endif %} +
{% csrf_token %}
diff --git a/bookwyrm/views/admin/site.py b/bookwyrm/views/admin/site.py index 4dc14be1..7e75a820 100644 --- a/bookwyrm/views/admin/site.py +++ b/bookwyrm/views/admin/site.py @@ -1,6 +1,5 @@ """ manage site settings """ from django.contrib.auth.decorators import login_required, permission_required -from django.shortcuts import redirect from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from django.views import View @@ -32,7 +31,8 @@ class Site(View): return TemplateResponse(request, "settings/site.html", data) form.save() - return redirect("settings-site") + data = {"site_form": forms.SiteForm(instance=site), "success": True} + return TemplateResponse(request, "settings/site.html", data) @login_required