What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-07 18:09:20
how to save form data to database in flask\
# routes.py import sqlite3 as sql from my_app import app from flask import render_template, request # connect to qa_database.sq (database will be created, if not exist) con = sql.connect('qa_database.db') con.execute('CREATE TABLE IF NOT EXISTS tbl_QA ... Add solution -
Python 2021-11-05 11:34:08
simple flask app
# Extremely simple flask application, will display 'Hello World!' on the screen when you run it # Access it by running it, then going to whatever port its running on (It'll say which port it's running on). from flask import Flask app = Flask(__name__) @a... Add solution -
Python 2021-11-03 05:32:08
flask site route
from flask import render_template @app.route('/hello/') @app.route('/hello/<name>') def hello(name=None): return render_template('hello.html', name=name) --------------------------------------------------- <!doctype html> <title>... Add solution -
Python 2021-11-02 19:46:23
how to monitor a website traffic python
from flask import Flask, render_template, request, session, jsonify import urllib.request from pusher import Pusher from datetime import datetime import httpagentparser import json import os import hashlib from dbsetup ... Add solution