Esempio n. 1
0
def addMessage(tag, title, content, imageUrl):
    message = Message()
    message.tabTitle = tag
    message.title = title
    message.content = content
    message.imageUrl = imageUrl
    message.createTime = timeUtil.getDatabaseTimeNow()
    message.save()
    return True
Esempio n. 2
0
def addCategory(categoryName):
    category = DishCategory()
    category.categoryName = categoryName
    category.createTime = timeUtil.getDatabaseTimeNow()
    category.save()
    return category.id