Merge pull request #2202 from bookwyrm-social/settings-warnings
New and improved warnings on the admin dashboard
This commit is contained in:
commit
bd6774fca8
10 changed files with 132 additions and 45 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue