python - Mongo alchemy select statements -
i using mongoalchemy first time , proving great tool. when seek select objects database cant value of objects. code below (i using flask):
class password(db.document): password = db.stringfield() username = db.stringfield() scheme = db.stringfield() @app.route('/search_password', methods=['get', 'post']) def search_password(): if request.method == 'get': session = db.session passwords = session.query(password) password = passwords.first() homecoming render_template('search_for_passwords.html', passwords=password) elif request.method == 'post': scheme = request.form['system']
so when seek access fields cant because document. how fields back?
from variable name looks me passwords
list
whereas password
document
, may need post html template well.
python mongodb mongoalchemy
No comments:
Post a Comment