當前位置: 首頁>>代碼示例>>Python>>正文


Python Submission.authorname方法代碼示例

本文整理匯總了Python中models.Submission.authorname方法的典型用法代碼示例。如果您正苦於以下問題:Python Submission.authorname方法的具體用法?Python Submission.authorname怎麽用?Python Submission.authorname使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在models.Submission的用法示例。


在下文中一共展示了Submission.authorname方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

# 需要導入模塊: from models import Submission [as 別名]
# 或者: from models.Submission import authorname [as 別名]
    def setUp(self):

        u = User()
        u.username = 'reviewerluke'
        u.save()

        r = Reviewer()
        r.user = u
        r.name = 'Luke'
        r.affiliation = 'COS'
        r.email = '[email protected]'
        r.bio = 'I love to have fun.'
        r.research = 'Fun Facts'
        r.website = 'http://lukemarsh.com'
        r.osfreviews = 0
        r.save()

        s = Submission()
        s.conference = 'FooCon'
        s.title = 'Effects of Foo on Bar'
        s.reviewdeadline = datetime.date(2016, 12, 25).isoformat()
        s.authorname = 'Foo Bar'
        s.authoremail = '[email protected]'
        s.status = 'Awaiting review'
        s.link = 'http://foobar.org'
        s.attachment = '/foo/bar.pdf'
        s.save()

        s.reviewer.add(r)
        s.save()

        u2 = User()
        u2.username = 'editortom'
        u2.save()

        ed = Editor()
        ed.user = u2
        ed.name = 'Tom Heatwole'
        ed.email = '[email protected]'
        ed.save()

        s.editor = ed
        s.save()

        ev = Evaluation()
        ev.status = 'Pending'
        ev.progress = 'Received'
        ev.premise = 5
        ev.research = 6
        ev.style = 4
        ev.comment = 'This is a comment.'

        ev.reviewer = r
        ev.submission = s
        ev.save()
開發者ID:cameronblandford,項目名稱:osf_peerreview_front,代碼行數:57,代碼來源:tests.py


注:本文中的models.Submission.authorname方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。