Select theme in context processors
This commit is contained in:
@ -174,17 +174,6 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
||||
property_fields = [("following_link", "following")]
|
||||
field_tracker = FieldTracker(fields=["name", "avatar"])
|
||||
|
||||
@property
|
||||
def get_theme(self):
|
||||
"""get the theme given the user/site"""
|
||||
if self.theme:
|
||||
return self.theme.path
|
||||
site_model = apps.get_model("bookwyrm", "SiteSettings", require_ready=True)
|
||||
site = site_model.objects.get()
|
||||
if site.default_theme:
|
||||
return site.default_theme.path
|
||||
return "css/themes/bookwyrm-light.scss"
|
||||
|
||||
@property
|
||||
def confirmation_link(self):
|
||||
"""helper for generating confirmation links"""
|
||||
|
Reference in New Issue
Block a user