当前位置: 首页>>代码示例>>Python>>正文


Python Issue.description方法代码示例

本文整理汇总了Python中issues.models.Issue.description方法的典型用法代码示例。如果您正苦于以下问题:Python Issue.description方法的具体用法?Python Issue.description怎么用?Python Issue.description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在issues.models.Issue的用法示例。


在下文中一共展示了Issue.description方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import description [as 别名]
def create(request):
    if request.method == 'POST':
        try:
            name = request.POST['name']
            description = request.POST['description']
            lat = request.POST['latitude']
            lng = request.POST['longitude']

        except:
            raise Http404

        issue = Issue()
        issue.name = name
        issue.description = description

        logging.debug('Debug latitude')

        issue.latitude = lat
        issue.longitude= lng

        issue.save()
        try:
            logging.debug('Saving issue')
            issue.save()

            # send email
            issue.new_issue_email()
        except:
            raise Http404

        return render(request, 'issues/show.html', {'issue': issue})
开发者ID:leonardok,项目名称:conserte.me,代码行数:33,代码来源:views.py

示例2: testIssueNotification

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import description [as 别名]
 def testIssueNotification(self):
     user = create_user()
 
     issue = Issue()
     issue.description = "This is a test"
     issue.save()
     
     assert Issue.all().count() == 1
开发者ID:andymckay,项目名称:arecibo,代码行数:10,代码来源:tests.py

示例3: testIssueNumber

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import description [as 别名]
    def testIssueNumber(self):
        issue = Issue()
        issue.description = "This is a test"
        issue.save()
        assert issue.number == 1

        issue = Issue()
        issue.description = "This is a test"
        issue.save()
        assert issue.number == 2

        old_issue = issue

        issue = Issue()
        issue.description = "This is a test"
        issue.save()
        assert issue.number == 3, issue.number

        old_issue.delete()

        issue = Issue()
        issue.description = "This is a test"
        issue.save()
        assert issue.number == 4
开发者ID:pombredanne,项目名称:arecibo,代码行数:26,代码来源:tests.py

示例4: testIssueAndErrorNotification

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import description [as 别名]
    def testIssueAndErrorNotification(self):
        user = create_user()
        
        issue = Issue()
        issue.description = "This is a test"
        issue.save()
        
        assert Issue.all().count() == 1

        c = Client()
        c.post(reverse("error-post"), test_data)

        #assert Notification.all().count() == 2
        # this would be 2 when issues are turned on
        assert Notification.all().count() == 1
        
        c = Client()
        res = c.get(reverse("notification-send"))        
        self.assertEquals(len(mail.outbox), 1)
开发者ID:andymckay,项目名称:arecibo,代码行数:21,代码来源:tests.py

示例5: testLogAdded

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import description [as 别名]
    def testLogAdded(self):
        issue = Issue()
        issue.description = "This is a test"
        issue.save()

        assert issue.log_set[0]
开发者ID:alanjds,项目名称:arecibo,代码行数:8,代码来源:tests.py


注:本文中的issues.models.Issue.description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。