This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Working example (20/08/2024) : Filling html form with either usb barcode reader or a camera in Android using Binary Eye (use the default browser to first fill the form (Firefox, Chrome or Samsung Internet...)) --> | |
| <!doctype html> | |
| <html lang=en> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta name="description" content=""> | |
| <meta name="author" content="Provencale SA"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Example of a dynamic list (add, remove button handled on client side) with data stored in a classic String in database. | |
| Works with Flask, Flask-WTForms, flask-SQLAlchemy (uses SQL lite for easy testing) | |
| Inspired from https://gist.github.com/kageurufu/6813878 | |
| """ | |
| import itertools | |
| from flask import Flask, render_template_string | |
| from flask import request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This is a modification from another gist of doobeh : | |
| https://gist.github.com/doobeh/cc9bf2a6709721ed270b | |
| The actual emission is separated in another thread to avoid delaying the server answear in case of long smtp response | |
| See: http://stackoverflow.com/questions/8616617/how-to-make-smtphandler-not-block | |
| """ | |
| import logging | |
| from flask import Flask |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This code can be considered Public domain. | |
| I did not find this elsewhere, so here is my first Gist | |
| """ | |
| ## Import theses from the app config or user... | |
| TIMEZONE = 'Europe/Paris' | |
| INPUT_DATETIME_FORMAT = "YYYY-MM-DD HH:mm" | |
| ## |