Last active
December 20, 2019 15:02
-
-
Save sonnyksimon/905130e875cf1f47cdff38b2b0032858 to your computer and use it in GitHub Desktop.
A label for a merger between Flask and web.py's database API.
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: -*- | |
""" | |
web | |
~~~ | |
A label for a merger between Flask and web.py's database API. | |
import flaskweb as web | |
app = web.app(__name__) | |
db = web.database(dbn='postgres', host='127.0.0.1', port=5432, | |
user='username', pw='password', db='dbname') | |
@app.route('/', methods=['GET']) | |
def index(): | |
todos = db.select('todo') | |
return web.render_template('index.html', todos=todos) | |
if __name__ == '__main__': | |
app.run() | |
:copyright: 2019 Pancubs.org | |
:license: MIT | |
""" | |
from flask import * | |
app = Flask | |
from web.utils import * | |
from web.db import * | |
def input(): | |
return storage(request.form) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment