示例#1
0
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.commit()
    print 'Initialized the database'
示例#2
0
def initdb():
    db.create_all()
    db.session.add(
        User(username='******', email='*****@*****.**', password='******'))
    db.session.add(User(username='******', email='*****@*****.**', password='******'))
    db.session.commit()
    print 'Initialized Database'
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.add(
        User(username="******", email="*****@*****.**"))
    db.session.commit()
    print "Initialized the database"
示例#4
0
def initdb():
    db.create_all()
    db.session.add(
        User(username="******", email='*****@*****.**', password='******'))
    db.session.add(
        User(username="******", email='*****@*****.**', password='******'))
    db.session.commit()
    print 'Initialzed the database'
示例#5
0
def initdb():
    db.create_all()
    db.session.add(
        User(username='******', email='*****@*****.**', password='******'))
    db.session.add(
        User(username='******', email='*****@*****.**', password='******'))
    db.session.commit()
    print 'Initialized the database'
示例#6
0
def init_db():
    db.create_all()

    db.session.add(Bookmark(url="http://goole.com", description="dbuabda"))
    db.session.add(Bookmark(url="http://mama.com", description="dbudeddabda"))

    db.session.commit()
    print("Initialized the database")
def initdb():
    db.create_all()
    db.session.add(
        User(username="******", email="*****@*****.**", password="******"))

    db.session.add(
        User(username="******", email="*****@*****.**", password="******"))

    db.session.commit()
    print 'Initialized the database'
示例#8
0
def initdb():
    db.create_all()
    db.session.add(
        User(username='******',
             email='*****@*****.**',
             password='******'))
    db.session.add(
        User(username='******',
             email='*****@*****.**',
             password='******'))
    db.session.commit()
    print('Initialized the database')
示例#9
0
def initdb():
    db.create_all()
    db.session.add(
        User(username="******",
             email="*****@*****.**",
             password="******"))
    db.session.add(
        User(username="******",
             email="*****@*****.**",
             password="******"))
    db.session.commit()
    print('initialized the database')
示例#10
0
def initdb():
    db.create_all()
    db.session.add(
        User(username="******",
             email="*****@*****.**",
             password="******"))
    db.session.add(
        User(username="******",
             email="*****@*****.**",
             password="******"))
    db.session.commit()
    print 'Initialized the database'
示例#11
0
def initdb():
    db.create_all()
    db.session.add(
        User(username="******",
             email="*****@*****.**",
             password="******"))

    db.session.add(
        User(username="******", email="*****@*****.**", password="******"))

    db.session.commit()
    print('Initialized the database')
示例#12
0
def insert_data():
    """
    creates database
    """
    db.create_all()
    zubidlo = User(username='******', email='*****@*****.**', password="******")
    db.session.add(zubidlo)

    def add_bookmark(url, description, tags):
        db.session.add(Bookmark(url=url, description=description, user=zubidlo, tags=tags))

    for name in ['python', 'flask', 'programming']:
        db.session.add(Tag(name=name))

    add_bookmark("http://www.pluralsight.com", "Hardcore development traininng.", "programming")
    add_bookmark("http://www.python.org", "My favourite language", "python")
    add_bookmark("http://www.flask.pocaa.org", "Web development", "flask")

    db.session.commit()
    print "inserted the data"
示例#13
0
def initdb():
    db.create_all()
    print('Initialized the database')
示例#14
0
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.commit()
    print("Initialized the database")
示例#15
0
def initdb():
    db.create_all()
    db.session.add(User(username='******', email='*****@*****.**'))
    db.session.add(User(username='******', email='*****@*****.**'))
    db.session.commit()
    print 'Initialized the database!'
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.commit()
    print('initialized the database')
示例#17
0
def create_db():
    print("Creating database...")
    db.create_all()
    db.session.add(User(username='******', email='*****@*****.**'))
    db.session.add(User(username='******', email='*****@*****.**'))
    db.session.commit()
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.commit()
    print "Initialized the database"
示例#19
0
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.commit()
    print('Initialized Database.')
示例#20
0
文件: manage.py 项目: ipr0/thermos
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.add(User(username="******", email="*****@*****.**", password="******"))
    db.session.commit()
    print("Initialized database")
示例#21
0
文件: manage.py 项目: driftbee/DBdev
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.commit()
    print 'Initialized the database'
示例#22
0
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.commit()
    print("Database initialized")
示例#23
0
def initdb():
    db.create_all()
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.add(User(username="******", email="*****@*****.**"))
    db.session.commit()
    print "Initalized the database."
示例#24
0
def initdb():
    db.create_all()
    db.session.add(User(username="******",email="*****@*****.**", password='******'))
    db.session.add(User(username="******",email="*****@*****.**", password='******'))
    db.session.commit()
    print 'Init DB'