tidy ups to #289

This commit is contained in:
rimu 2024-08-12 20:29:15 +12:00
parent 935337cbd0
commit 85726d5638
2 changed files with 4 additions and 2 deletions

View file

@ -142,7 +142,7 @@ for bounces, not a inbox you also use for other purposes.
### Development mode
Setting `MODE=development` in the `.env` file will enable the `<your-site>/dev/tools` page.
Setting `FLASK_DEBUG=1` in the `.env` file will enable the `<your-site>/dev/tools` page.
That page can be accessed from the `Admin` navigation drop down, or nav bar as `Dev Tools`. That page has buttons that can create/delete communities and topics. The communities and topics will all begin with "dev_".

View file

@ -10,12 +10,14 @@ from app.dev import bp
from app.dev.forms import AddTestCommunities, AddTestTopics, DeleteTestCommunities, DeleteTestTopics
from app.inoculation import inoculation
from app.models import Site, User, Community, CommunityMember, Language, Topic, utcnow
from app.utils import render_template, community_membership, moderating_communities, joined_communities, menu_topics, markdown_to_html
from app.utils import render_template, community_membership, moderating_communities, joined_communities, menu_topics, \
markdown_to_html, permission_required
# a page for handy dev tools
@bp.route('/dev/tools', methods=['GET', 'POST'])
@login_required
@permission_required('change instance settings')
def tools():
if not current_app.debug:
abort(404)