About 336,000 results
Open links in new tab
  1. can you add HTTPS functionality to a python flask web server?

    Apr 5, 2015 · from flask import Flask, jsonify from OpenSSL import SSL context = SSL.Context(SSL.PROTOCOL_TLSv1_2 ...

  2. How to divide flask app into multiple py files? - Stack Overflow

    Aug 17, 2012 · from flask import Flask app = Flask(__name__) and in your view files, import app like this: view1.py. from app_factory import app @app.route('/test', methods=['GET']) def test(): …

  3. python - How to run a flask application? - Stack Overflow

    Prior to Flask 2.2, the FLASK_APP and FLASK_ENV=development environment variables were used instead. FLASK_APP and FLASK_DEBUG=1 can still be used in place of the CLI …

  4. Configure Flask dev server to be visible across the network

    Oct 11, 2017 · FLASK_APP=app.py FLASK_ENV=development FLASK_RUN_HOST=[dev-host-ip] FLASK_RUN_PORT=5000 If you have a virtual environment, activate it and do a pip install …

  5. Get the data received in a Flask request - Stack Overflow

    from flask import request @app.route('/', methods=['GET', 'POST']) def parse_request(): data = request.data # data is empty # need posted data here The answer to this question led me to …

  6. python - How to serve static files in Flask - Stack Overflow

    Dec 18, 2013 · from flask import Flask, send_from_directory from flask_restful import Api, Resource from server ...

  7. python - Making an asynchronous task in Flask - Stack Overflow

    Aug 7, 2015 · from flask import Flask from celery import Celery broker_url = 'amqp://guest@localhost' # Broker URL for RabbitMQ task queue app = Flask(__name__) …

  8. Can't connect to Flask web service, connection refused

    May 31, 2015 · The Flask port being 5000 is just standard for whatever reason that I do not know. – Stev. Commented Jul ...

  9. flask - The requested URL was not found on the server. If you …

    Jul 6, 2017 · As you can see, in the updated "about.html" file, I have added an anchor tag with the href attribute set to {{ url_for('about') }}, which uses the Flask url_for function to generate the …

  10. Flask - Make a button direct to another page - Stack Overflow

    May 6, 2020 · This is the job of an anchor tag. Jinja2 (the template rendering component of Flask) allows you to use the url_for function to dynamically create a url, for a given view function.

Refresh