def pattern(): with app.app_context(): mongo.db.operations.drop() mongo.db.operations.insert( dict( name="x", pattern="{{ a * b }}" ) )
def run(): with app.app_context(): mongo.db.operations.insert(dict(name="+", pattern="{{ a + b }}")) mongo.db.operations.insert(dict(name="x", pattern="{{ a * b }}")) mongo.db.operations.insert(dict(name="d", pattern="{{ a / b }}")) mongo.db.operations.insert(dict(name="-", pattern="{{ a - b }}")) mongo.db.operations.insert(dict(name="*", pattern="{{ a * b }}"))
def pattern(): with app.app_context(): mongo.db.operations.drop() seeds.run()
from webcalc import app, mongo with app.app_context(): mongo.db.operations.insert(dict(name="+", pattern="{{ a + b }}")) mongo.db.operations.insert(dict(name="x", pattern="{{ a * b }}"))