Merge pull request #1398 from bookwyrm-social/site-settings-form

Adds short description to edit site form
This commit is contained in:
Mouse Reeve 2021-09-10 12:25:25 -07:00 committed by GitHub
commit d3dc0fa121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 3.2.4 on 2021-09-10 19:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0092_sitesettings_instance_short_description"),
]
operations = [
migrations.AlterField(
model_name="sitesettings",
name="instance_short_description",
field=models.CharField(blank=True, max_length=255, null=True),
),
]

View file

@ -20,7 +20,7 @@ class SiteSettings(models.Model):
max_length=150, default="Social Reading and Reviewing" max_length=150, default="Social Reading and Reviewing"
) )
instance_description = models.TextField(default="This instance has no description.") instance_description = models.TextField(default="This instance has no description.")
instance_short_description = models.TextField(blank=True, null=True) instance_short_description = models.CharField(max_length=255, blank=True, null=True)
# about page # about page
registration_closed_text = models.TextField( registration_closed_text = models.TextField(

View file

@ -23,6 +23,11 @@
<label class="label" for="id_instance_description">{% trans "Instance description:" %}</label> <label class="label" for="id_instance_description">{% trans "Instance description:" %}</label>
{{ site_form.instance_description }} {{ site_form.instance_description }}
</div> </div>
<div class="field">
<label class="label mb-0" for="id_short_description">{% trans "Short description:" %}</label>
<p class="help">{% trans "Used when the instance is previewed on joinbookwyrm.com. Does not support html or markdown." %}</p>
{{ site_form.instance_short_description }}
</div>
<div class="field"> <div class="field">
<label class="label" for="id_code_of_conduct">{% trans "Code of conduct:" %}</label> <label class="label" for="id_code_of_conduct">{% trans "Code of conduct:" %}</label>
{{ site_form.code_of_conduct }} {{ site_form.code_of_conduct }}