Diksha Bhrigue

    def main():

    app = Flask("My app")




    When you run this code, Flask will create a new instance of your app, call the main() function in that app, and finally tell the browser to go to http://localhost:5000/ .

    In this code, we define a main() function that will do the following:

    Create an instance of our app

    Call the render_template() function to render the template defined in main.html

    Call the request.url() function to set the url for the app. This will be the root page of our app.

    Return the function to the calling code.

    from flask import Flask, render_template, request
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.