diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 3a33196c0..817829706 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -90,6 +90,9 @@ Import books + {% if perms.bookwyrm.create_invites or perms.bookwyrm.edit_instance_settings%} + + {% endif %} {% if perms.bookwyrm.create_invites %}
  • @@ -97,6 +100,13 @@
  • {% endif %} + {% if perms.bookwyrm.edit_instance_settings %} +
  • + + Site Configuration + +
  • + {% endif %}
  • diff --git a/bookwyrm/templates/settings/site.html b/bookwyrm/templates/settings/site.html index 830a7dc5e..d071facf5 100644 --- a/bookwyrm/templates/settings/site.html +++ b/bookwyrm/templates/settings/site.html @@ -51,11 +51,11 @@

    Footer Content

    - +
    - +
    diff --git a/bookwyrm/views/site.py b/bookwyrm/views/site.py index 85c1751d6..0a5e270b9 100644 --- a/bookwyrm/views/site.py +++ b/bookwyrm/views/site.py @@ -27,5 +27,14 @@ class Site(View): def post(self, request): ''' edit the site settings ''' + site = models.SiteSettings.objects.get() + form = forms.SiteForm(request.POST, instance=site) + if not form.is_valid(): + data = { + 'title': 'Site Settings', + 'site_form': form + } + return TemplateResponse(request, 'settings/site.html', data) + form.save() - return redirect('/settings/site-settings') + return redirect('settings-site')