示例#1
0
def user(username):
	item = TestModel(id='1')
	item.text=str(username)
	print(item.text)
	return '<h1>welcome! %s</h1>' % username
示例#2
0
import sys
sys.path.append('D:\\PycharmProjects\\FlaskBlog')
from model import TestModel
test = TestModel(testid='1')
test.text='test1'
test.save()