mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
tidy ups to #289
This commit is contained in:
parent
935337cbd0
commit
85726d5638
2 changed files with 4 additions and 2 deletions
|
@ -142,7 +142,7 @@ for bounces, not a inbox you also use for other purposes.
|
||||||
|
|
||||||
### Development mode
|
### 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_".
|
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_".
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,14 @@ from app.dev import bp
|
||||||
from app.dev.forms import AddTestCommunities, AddTestTopics, DeleteTestCommunities, DeleteTestTopics
|
from app.dev.forms import AddTestCommunities, AddTestTopics, DeleteTestCommunities, DeleteTestTopics
|
||||||
from app.inoculation import inoculation
|
from app.inoculation import inoculation
|
||||||
from app.models import Site, User, Community, CommunityMember, Language, Topic, utcnow
|
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
|
# a page for handy dev tools
|
||||||
@bp.route('/dev/tools', methods=['GET', 'POST'])
|
@bp.route('/dev/tools', methods=['GET', 'POST'])
|
||||||
@login_required
|
@login_required
|
||||||
|
@permission_required('change instance settings')
|
||||||
def tools():
|
def tools():
|
||||||
if not current_app.debug:
|
if not current_app.debug:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
Loading…
Reference in a new issue