mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-22 07:10:59 +00:00
12 lines
290 B
Python
12 lines
290 B
Python
|
from users.services import AnnouncementService
|
||
|
|
||
|
|
||
|
def user_context(request):
|
||
|
return {
|
||
|
"announcements": (
|
||
|
AnnouncementService(request.user).visible()
|
||
|
if request.user.is_authenticated
|
||
|
else AnnouncementService.visible_anonymous()
|
||
|
)
|
||
|
}
|