Refactors block button for query efficiency

This commit is contained in:
Mouse Reeve
2021-05-22 20:36:30 -07:00
parent 9285f483c2
commit bdf267dea5
6 changed files with 13 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{% load i18n %}
{% if not user in request.user.blocks.all %}
{% if not blocks %}
<form name="blocks" method="post" action="/block/{{ user.id }}">
{% csrf_token %}
<button class="button is-danger is-light is-small {{ class }}" type="submit">{% trans "Block" %}</button>