Ejemplo n.º 1
0
def default_add_project_urls(instance, **kw):
    log("Firing signal: default_add_project_urls")
    if instance.project:
        for project_url in instance.project.projecturl_set:
            issue_project_url = IssueProjectURL(issue=instance,
                                                project_url=project_url,
                                                status="not_fixed")
            issue_project_url.save()
Ejemplo n.º 2
0
def edit_project_url(request, pk):
    issue = Issue.get(pk)
    urls = IssueProjectURL.all().filter("issue = ", issue)
    url_ids = dict([(url.id, url) for url in urls])
    if request.POST:
        for key, value in request.POST.items():
            if key in url_ids:
                assert value in [ i[0] for i in issue_project_url_statuses ], \
                    "%s not in %s" % (value, issue_project_url_statuses)
                url_ids[key].status = value
                url_ids[key].save()
        return HttpResponseRedirect(reverse("issues-view", args=[
            pk,
        ]))
    return direct_to_template(request,
                              "issue_project_url.html",
                              extra_context={
                                  "issue": issue,
                                  "urls": urls,
                                  "issue_project_url_statuses":
                                  issue_project_url_statuses,
                                  "nav": {
                                      "selected": "issues",
                                  },
                              })
Ejemplo n.º 3
0
def edit_project_url(request, pk):
    issue = Issue.get(pk)
    urls = IssueProjectURL.all().filter("issue = ", issue)
    url_ids = dict([ (url.id, url) for url in urls ])
    if request.POST:
        for key, value in request.POST.items():
            if key in url_ids:
                assert value in [ i[0] for i in issue_project_url_statuses ], \
                    "%s not in %s" % (value, issue_project_url_statuses)
                url_ids[key].status = value
                url_ids[key].save()
        return HttpResponseRedirect(reverse("issues-view", args=[pk,]))
    return direct_to_template(request, "issue_project_url.html", extra_context={
        "issue": issue,
        "urls": urls,
        "issue_project_url_statuses": issue_project_url_statuses,
        "nav": {"selected": "issues",},
    })
Ejemplo n.º 4
0
def default_add_project_urls(instance, **kw):
    log("Firing signal: default_add_project_urls")
    if instance.project:
        for project_url in instance.project.projecturl_set:
            issue_project_url = IssueProjectURL(issue=instance, project_url=project_url, status="not_fixed")
            issue_project_url.save()