diff --git a/INSTALL.md b/INSTALL.md index 7e056aaa..6b81743c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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 `/dev/tools` page. +Setting `FLASK_DEBUG=1` in the `.env` file will enable the `/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_". diff --git a/app/dev/routes.py b/app/dev/routes.py index 5043c73f..b9c02844 100644 --- a/app/dev/routes.py +++ b/app/dev/routes.py @@ -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)