コード例 #1
0
ファイル: content.py プロジェクト: qyqx/tracim
 def set_status(self, content: Content, new_status: str):
     if new_status in ContentStatus.allowed_values():
         content.status = new_status
         content.revision_type = ActionDescription.STATUS_UPDATE
     else:
         raise ValueError(
             'The given value {} is not allowed'.format(new_status))
コード例 #2
0
ファイル: helpers.py プロジェクト: lebouquetin/tracim
def AllStatus(type=''):
    return ContentStatus.all(type)
コード例 #3
0
def AllStatus(type=''):
    return ContentStatus.all(type)
コード例 #4
0
ファイル: content.py プロジェクト: buxx/tracim
 def set_status(self, content: Content, new_status: str):
     if new_status in ContentStatus.allowed_values():
         content.status = new_status
         content.revision_type = ActionDescription.STATUS_UPDATE
     else:
         raise ValueError('The given value {} is not allowed'.format(new_status))