moviewyrm/bookwyrm/context_processors.py

11 lines
360 B
Python
Raw Normal View History

2021-03-08 16:49:10 +00:00
""" customize the info available in context for rendering templates """
2020-12-11 20:31:02 +00:00
from bookwyrm import models
2021-03-08 16:49:10 +00:00
def site_settings(request): # pylint: disable=unused-argument
2021-04-26 16:15:42 +00:00
"""include the custom info about the site"""
return {
"site": models.SiteSettings.objects.get(),
2021-05-19 22:17:32 +00:00
"active_announcements": models.Announcement.active_announcements(),
}