rename cache route to avoid clash with caching mechanism

This commit is contained in:
rimu 2024-03-12 19:33:26 +13:00
parent 0f055f590d
commit a20d706da3
3 changed files with 4 additions and 12 deletions

View file

@ -8,7 +8,7 @@ from app import db, constants, cache
from app.inoculation import inoculation from app.inoculation import inoculation
from app.models import Post, Domain, Community, DomainBlock from app.models import Post, Domain, Community, DomainBlock
from app.domain import bp from app.domain import bp
from app.utils import get_setting, render_template, permission_required, joined_communities, moderating_communities, \ from app.utils import render_template, permission_required, joined_communities, moderating_communities, \
user_filters_posts, blocked_domains user_filters_posts, blocked_domains
from sqlalchemy import desc from sqlalchemy import desc
@ -77,7 +77,7 @@ def domains():
@bp.route('/domains/banned', methods=['GET']) @bp.route('/domains/banned', methods=['GET'])
@login_required @login_required
def blocked_domains(): def domains_blocked_list():
if not current_user.trustworthy(): if not current_user.trustworthy():
abort(404) abort(404)

View file

@ -35,20 +35,12 @@
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<th>Domain</th> <th>Domain</th>
<th><span title="{{ _('How many times has something on this domain been posted?') }}"># Posts</span></th> <th><span title="{{ _('How many times has something on this domain been posted') }}"># Posts</span></th>
{% if not current_user.is_anonymous %}{% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %}<th>Actions</th>{%endif%}{%endif%}
</tr> </tr>
{% for domain in domains %} {% for domain in domains %}
<tr> <tr>
<td><a href="{{ url_for('domain.show_domain', domain_id=domain.id) }}">{{ domain.name }}</a></td> <td><a href="{{ url_for('domain.show_domain', domain_id=domain.id) }}">{{ domain.name }}</a></td>
<td>{{ domain.post_count }}</td> <td>{{ domain.post_count }}</td>
{% if not current_user.is_anonymous %}
{% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %}
<td>
<a class="confirm_first btn btn-primary" title="{{ _('Banning this domain will delete all posts linking to this domain and prevent future posts linking to that domain.') }}" href="/d/{{ domain.id }}/ban">{{ _('Ban') }}</a>
</td>
{% endif %}
{% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View file

@ -35,7 +35,7 @@
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<th>Domain</th> <th>Domain</th>
{% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %}<th>Actions</th>{%endif%} {% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %}<th>Actions</th>{% endif %}
</tr> </tr>
{% for domain in domains %} {% for domain in domains %}
<tr> <tr>