@app.route('/')
      @app.route('/hello')
      def methodName():
          name = request.args.get('name')
          if name is None:
              name = request.cookies.get('name', 'Human')
          response = '<h1>Hello, %s!</h1>' % escape(name)  # escape name to avoid XSS
          # return different response according to the user's authentication status
          if 'logged_in' in session:
              response += '[Authenticated]'
          else:
              response += '[Not Authenticated]'
          return response

      Python language logo
      your recipe card header background
      Route with authentication

      flask
      Python public recipes

      Create route in flask with request argument

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.