2021-03-08 11:49:10 -05:00
|
|
|
""" customize the info available in context for rendering templates """
|
2020-12-11 15:31:02 -05:00
|
|
|
from bookwyrm import models
|
2021-05-26 11:54:59 -04:00
|
|
|
from bookwyrm.settings import SITE_PATH, STATIC_URL, STATIC_PATH, MEDIA_URL, MEDIA_PATH
|
2020-12-11 15:31:02 -05:00
|
|
|
|
2021-03-08 11:49:10 -05:00
|
|
|
|
|
|
|
def site_settings(request): # pylint: disable=unused-argument
|
2021-04-26 12:15:42 -04:00
|
|
|
"""include the custom info about the site"""
|
2021-05-19 16:56:00 -04:00
|
|
|
return {
|
|
|
|
"site": models.SiteSettings.objects.get(),
|
2021-05-19 18:17:32 -04:00
|
|
|
"active_announcements": models.Announcement.active_announcements(),
|
2021-05-26 11:54:59 -04:00
|
|
|
"site_path": SITE_PATH,
|
|
|
|
"static_url": STATIC_URL,
|
|
|
|
"media_url": MEDIA_URL,
|
|
|
|
"static_path": STATIC_PATH,
|
|
|
|
"media_path": MEDIA_PATH,
|
2021-05-19 16:56:00 -04:00
|
|
|
}
|