<reponame>xu6148152/Binea_Python_Project
# coding=utf-8
from www.models import User
from www.transwarp import db

__author__ = 'xubinggui'

db.create_engine(user='www-data', password='<PASSWORD>', database='awesome')

u = User(name='Test', email='<EMAIL>', password='<PASSWORD>', image='about:blank')

u.insert()

print 'new user id:', u.id

u1 = User.find_first('where email=?', '<EMAIL>')
print 'find user\'s name:', u1.name

u1.delete()

u2 = User.find_first('where email=?', '<EMAIL>')
print 'find user:', u2
# coding=utf-8
from www.models import User
from www.transwarp import db

__author__ = 'xubinggui'

db.create_engine(user='www-data', password='<PASSWORD>', database='awesome')

u = User(name='Test', email='<EMAIL>', password='<PASSWORD>', image='about:blank')

u.insert()

print 'new user id:', u.id

u1 = User.find_first('where email=?', '<EMAIL>')
print 'find user\'s name:', u1.name

u1.delete()

u2 = User.find_first('where email=?', '<EMAIL>')
print 'find user:', u2
# coding=utf-8