can I make a flask python page appear inside html page. My admin login page is linked to the html page but I want it to be linked with admin.py page

Viewed 16

this is the code that points to the html page but I want it to point to python page called adminpage.py

@pages.route('/adminpage', methods=['GET', 'POST'])
@login_required

def admin():

    if current_user.admin :
        return render_template("adminpage.html", user = current_user)
    flash('Only admins can access this page')
    return redirect(url_for('pages.home'))

0 Answers
Related