diff --git a/website/common/models.py b/website/common/models.py index d21f042..0ca821c 100644 --- a/website/common/models.py +++ b/website/common/models.py @@ -1,4 +1,5 @@ from django.db import models +from django.utils.functional import classproperty from wagtail.admin.panels import FieldPanel from wagtail.models import Page @@ -7,8 +8,7 @@ class BasePage(Page): class Meta: abstract = True - @classmethod - @property + @classproperty def body_class(cls) -> str: return "page-" + cls._meta.db_table.replace("_", "-")