1
0
Fork 0

Adds warnings for missing privacy policies and codes of conduct

This commit is contained in:
Mouse Reeve 2022-07-08 11:58:55 -07:00
parent 4a2e191d92
commit ba7ae46c75
4 changed files with 53 additions and 0 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()
# other warnings
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)