mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Change is_subscriber and was_subscriber to cached_properties
This commit is contained in:
@ -54,7 +54,7 @@
|
||||
{% if user.memberships.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == profile %}
|
||||
{# if the user is member of a club, he can view the subscription state #}
|
||||
<p>
|
||||
{% if profile.is_subscribed() %}
|
||||
{% if profile.is_subscribed %}
|
||||
{% if user == profile or user.is_root or user.is_board_member %}
|
||||
{{ user_subscription(profile) }}
|
||||
{% endif %}
|
||||
|
@ -91,7 +91,7 @@
|
||||
<h4>{% trans %}Elections{% endtrans %}</h4>
|
||||
<ul>
|
||||
<li><a href="{{ url('election:list') }}">{% trans %}See available elections{% endtrans %}</a></li>
|
||||
{%- if user.is_subscribed() -%}
|
||||
{%- if user.is_subscribed -%}
|
||||
<li><a href="{{ url('election:create') }}">{% trans %}Create a new election{% endtrans %}</a></li>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user