@blueprint.route('<STR_LIT:/>', methods=['<STR_LIT:GET>', ])<EOL>def index():
ctx = mycommunities_ctx()<EOL>p = request.args.get('<STR_LIT:p>', type=str)<EOL>so = request.args.get('<STR_LIT>', type=str)<EOL>page = request.args.get('<STR_LIT>', type=int, default=<NUM_LIT:1>)<EOL>so = so or current_app.config.get('<STR_LIT>')<EOL>communities = Community.filter_communities(p, so)<EOL>featured_community = FeaturedCommunity.get_featured_or_none()<EOL>form = SearchForm(p=p)<EOL>per_page = <NUM_LIT:10><EOL>page = max(page, <NUM_LIT:1>)<EOL>p = Pagination(page, per_page, communities.count())<EOL>ctx.update({<EOL>'<STR_LIT>': max(p.per_page * (p.page - <NUM_LIT:1>), <NUM_LIT:0>),<EOL>'<STR_LIT>': min(p.per_page * p.page, p.total_count),<EOL>'<STR_LIT>': p.total_count,<EOL>'<STR_LIT>': p,<EOL>'<STR_LIT>': form,<EOL>'<STR_LIT:title>': _('<STR_LIT>'),<EOL>'<STR_LIT>': communities.slice(<EOL>per_page * (page - <NUM_LIT:1>), per_page * page).all(),<EOL>'<STR_LIT>': featured_community,<EOL>})<EOL>return render_template(<EOL>current_app.config['<STR_LIT>'], **ctx)<EOL>
Index page with uploader and list of existing depositions.