[Python] Flask keeps executing the same old code even after replacing the code with new one

Discussão em 'Python' iniciado por Stack, Janeiro 30, 2025.

  1. Stack

    Stack Membro Participativo

    I am extremely new to flask framework. I wrote a few basic beginner codes in flask and after I did the changes to it, the output doesn't change as is the same code is running behind the scene which I can't figure out.

    I Tried:-

    Changing the directory of my python file. Deleting the file and made a new one. Deleting the browser cache and cookies.

    This seems to be a common issue but there's no perfect answer for this question on this site, please help.

    Sample code:

    from flask import Flask , redirect , url_for, render_template

    app = Flask(__name__)

    @app.route("/")
    def home():
    return "Hello bc"

    if __name__ == "__main__":
    app.run()


    [​IMG]

    Continue reading...

Compartilhe esta Página