1
0
Fork 0

Merge pull request #2202 from bookwyrm-social/settings-warnings

New and improved warnings on the admin dashboard
This commit is contained in:
Mouse Reeve 2022-07-08 15:39:23 -07:00 committed by GitHub
commit bd6774fca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 132 additions and 45 deletions

View file

@ -42,6 +42,19 @@ class Dashboard(View):
"email_sender"
] = f"{settings.EMAIL_SENDER_NAME}@{settings.EMAIL_SENDER_DOMAIN}"
site = models.SiteSettings.objects.get()
# pylint: disable=protected-access
data["missing_conduct"] = (
not site.code_of_conduct
or site.code_of_conduct
== site._meta.get_field("code_of_conduct").get_default()
)
data["missing_privacy"] = (
not site.privacy_policy
or site.privacy_policy
== site._meta.get_field("privacy_policy").get_default()
)
# check version
try:
release = get_data(settings.RELEASE_API, timeout=3)