Ejemplo n.º 1
0
def release(request, build_id, template_name="buildmanager/release_confirmation.html"): 
    try: 
        build = ProjectBuild.objects.get(id=build_id)
    except ProjectBuild.DoesNotExist:
        raise Http404
    try:
        build.release(request.user)
        context = {}
        context["build"] = build
        context["jad_url"] =  build_url(build.get_jad_downloadurl(), request)
        context["latest_url"] = build_url(build.project.get_latest_jad_url(), request)
         
        return render_to_response(request, template_name, context)
    except BuildError, e:
        error_string = "Problem releasing build: %s, the errors are as follows:<br><br>%s" % (build, e.get_error_string("<br><br>"))
        return _handle_error(request, error_string)
Ejemplo n.º 2
0
   def display_string(self):
       return """\tDomain: %s 
tAttachment: %s 
tSubmission: %s 
tSubmit Time: %s 
tContent Type: %s 
tURI: %s
tURL to view on server: %s
                 """  % \
                 (self.submission.domain, self.id, self.submission.id, 
                  self.submission.submit_time, self.attachment_content_type, 
                  self.attachment_uri, 
                  build_url(reverse('single_submission', args=(self.submission.id,))))
Ejemplo n.º 3
0
 def get_display_string(self):
     '''Like calling str() but with a url attached'''
     return "%s\nurl on server: %s" % (str(self),
                        build_url(reverse('show_build', 
                                          args=(self.id,))))