本文整理匯總了Python中model.group.Group.description方法的典型用法代碼示例。如果您正苦於以下問題:Python Group.description方法的具體用法?Python Group.description怎麽用?Python Group.description使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類model.group.Group
的用法示例。
在下文中一共展示了Group.description方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Group
# 需要導入模塊: from model.group import Group [as 別名]
# 或者: from model.group.Group import description [as 別名]
# -*- coding: utf-8 -*-
from hashlib import sha256
from helper.database import DatabaseHelper
from model.board import Board
from model.group import Group
from model.user import User
DatabaseHelper.create_all()
dbsession = DatabaseHelper.session()
"""
BASIC REQUIREMENT FROM HERE
"""
anybody = Group(u"anybody")
anybody.description = "All user must be approved by being assigned to this group"
dbsession.add(anybody)
nobody = Group("nobody")
nobody.description = "nobody can be registered in this group"
dbsession.add(nobody)
admin = Group("admin")
dbsession.add(admin)
notice = Board("notice", u"공지사항", admin, anybody)
dbsession.add(notice)
free = Board("free", u"자유게시판", anybody, anybody)
dbsession.add(free)