view for emoji reference

This commit is contained in:
Jason McBrayer 2018-08-09 19:39:23 -04:00
parent 54d507ca68
commit 8389ffdf9d
2 changed files with 10 additions and 0 deletions

View File

@ -55,5 +55,6 @@ urlpatterns = [
path('mute/<int:id>', views.mute, name='mute'),
path('search', views.search, name='search'),
path('search_results', views.search_results, name='search_results'),
path('emoji', views.emoji_reference, name='emoji'),
path('', views.home),
]

View File

@ -569,3 +569,12 @@ def privacy(request):
return render(request, 'privacy.html',
{"fullbrutalism": fullbrutalism_p(request),
'own_acct' : request.session['user']})
@cache_page(60 * 30)
def emoji_reference(request):
mastodon = get_mastodon(request)
emojos = mastodon.custom_emojis()
return render(request, 'main/emoji.html',
{"fullbrutalism": fullbrutalism_p(request),
"emojos"=emojos,
'own_acct' : request.session['user']})