Cache follow button template snippet
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load cache %}
|
||||
|
||||
{% cache None follow_button request.user.id user.id %}
|
||||
{% if request.user == user or not request.user.is_authenticated %}
|
||||
{% elif user in request.user.blocks.all %}
|
||||
{% include 'snippets/block_button.html' with blocks=True %}
|
||||
@ -42,3 +45,4 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcache %}
|
||||
|
Reference in New Issue
Block a user