What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-11 18:00:01
run python script on heroku
Sure, you need to do a few things: Define a requirements.txt file in the root of your project that lists your dependencies. This is what Heroku will use to 'detect' you're using a Python app. In the Heroku scheduler addon, just define the command you ne... Add solution -
Python 2022-03-09 09:05:05
python flask get user input
Unless you want to do something more complicated, feeding data from a HTML form into Flask is pretty easy. Create a view that accepts a POST request (my_form_post). Access the form elements in the dictionary request.form. templates/my-form.html: <for... Add solution -
Html 2022-03-06 03:40:18
How to connect your app project with home.html
from flask import Flask, render_template app = Flask(__name__) @app.route("/") def home(): return render_template("home.html") @app.route("/about) def about(): return render_template("about.html") if ... Add solution -
Python 2022-02-28 06:35:10
flask session
from flask import Flask, session, redirect, url_for, request from markupsafe import escape app = Flask(__name__) # Set the secret key to some random bytes. Keep this really secret! app.secret_key = b'_5#y2L"F4Q8z\n\xec]/' @app.route('/') def index... Add solution -
Python 2022-02-26 12:40:09
how to run flask with pyqt5
from PyQt5.QtWidgets import QLabel, QVBoxLayout, QMainWindow, QApplication, QWidget from flask import Flask, render_template from threading import Thread import sys # You can copy and paste this code for test and run it class MainWindow(QMainWindow): ... Add solution -
Python 2022-02-24 20:15:04
python web app with redis github
from flask import Flask from flask_redis import FlaskRedis from mockredis import MockRedis def create_app(): app = Flask(__name__) if app.testing: redis_store = FlaskRedis.from_custom_provider(MockRedis) else: redis_store = F... Add solution -
Python 2022-02-24 11:50:12
from flask import Flask app = Flask(__name__) @app.route('/',methods = ('GET')) def home(): return ('Hello World!!1') if __name__== '_main_': app.run()
from flask import Flask app = Flask(__name__) @app.route('/',methods = ('GET')) def home(): return ('Hello World!!1') if __name__== '_main_': app.run() Add solution -
Python 2022-02-03 13:56:12
how to get value from txtbox in flask
from flask import Flask, request, render_template app = Flask(__name__) @app.route('/') def my_form(): return render_template('my-form.html') @app.route('/', methods=['POST']) def my_form_post(): text = request.form['text'] processed_text =... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5