diff options
author | Andrew Godwin | 2022-12-15 00:35:04 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-15 00:43:39 -0700 |
commit | 69f1b3168ac3f29fc4bafba0418769248b10062a (patch) | |
tree | 23b84b73be1f791d20c844ab4435152f8b182804 /core/models | |
parent | e0053b69ded06ef246db6239baeea87617a2621c (diff) | |
download | takahe-69f1b3168ac3f29fc4bafba0418769248b10062a.tar.gz takahe-69f1b3168ac3f29fc4bafba0418769248b10062a.tar.bz2 takahe-69f1b3168ac3f29fc4bafba0418769248b10062a.zip |
Improve cacheability
Diffstat (limited to 'core/models')
-rw-r--r-- | core/models/config.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/models/config.py b/core/models/config.py index 2bb0d75..8f5dc31 100644 --- a/core/models/config.py +++ b/core/models/config.py @@ -5,10 +5,10 @@ import pydantic from asgiref.sync import sync_to_async from django.core.files import File from django.db import models -from django.templatetags.static import static from django.utils.functional import lazy from core.uploads import upload_namer +from core.uris import StaticAbsoluteUrl from takahe import __version__ @@ -201,8 +201,10 @@ class Config(models.Model): site_name: str = "Takahē" highlight_color: str = "#449c8c" site_about: str = "<h2>Welcome!</h2>\n\nThis is a community running Takahē." - site_icon: UploadedImage = static("img/icon-128.png") - site_banner: UploadedImage = static("img/fjords-banner-600.jpg") + site_icon: UploadedImage = StaticAbsoluteUrl("img/icon-128.png").relative # type: ignore + site_banner: UploadedImage = StaticAbsoluteUrl( + "img/fjords-banner-600.jpg" + ).relative # type: ignore policy_terms: str = "" policy_privacy: str = "" |