本文整理汇总了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)