import os from flask import Blueprint, current_app, render_template bp = Blueprint('file_listing', __name__) @bp.route('/file_listing') def index(): video_path = current_app.config['MOVIE_DIR'] filenames = os.listdir(video_path) return render_template('file_listing/index.html', filenames=filenames)