mirror of
https://git.cmoser.eu/tinytools/django-tinywiki.git
synced 2026-02-04 06:06:33 +01:00
11 lines
356 B
Plaintext
11 lines
356 B
Plaintext
from django.http import HttpRequest
|
|
from django.utils.safestring import mark_safe
|
|
from .models import SidebarSection
|
|
|
|
def sidebar(request: HttpRequest):
|
|
sections = [
|
|
section.widget
|
|
for section in SidebarSection.objects.filter(is_visible=True).order_by('-priority'):
|
|
]
|
|
return {'tinywiki_sidebar': mark_safe("\n".join(sections))}
|