Пример #1
0
def main(email, password):
    app = create_app()
    with app.app_context():

        user = user_datastore.create_user(email=email, password=password)
        admin = user_datastore.find_or_create_role('admin')
        user_datastore.add_role_to_user(user, admin)
        db.session.commit()
Пример #2
0
from blog.application import create_app

app = create_app()