Example #1
0
 def view_one(self,request,row,**kw):
     #print "Report.view_one()", request.path
     if not self.can_view.passes(request):
         return render.sorry(request)
     if is_editing(request) and self.can_change.passes(request):
         r = render.EditOneReportRenderer(row,request,True,self,**kw)
     else:
         r = render.ViewOneReportRenderer(row,request,True,self,**kw)
     return r.render_to_response()
Example #2
0
 def view_one(self, request, row, **kw):
     #print "Report.view_one()", request.path
     if not self.can_view.passes(request):
         return render.sorry(request)
     if is_editing(request) and self.can_change.passes(request):
         r = render.EditOneReportRenderer(row, request, True, self, **kw)
     else:
         r = render.ViewOneReportRenderer(row, request, True, self, **kw)
     return r.render_to_response()
Example #3
0
 def view_many(self,request):
     #~ msg = "Hello, "+unicode(request.user)
     #~ print msg
     #~ request.user.message_set.create(msg)
     if not self.can_view.passes(request):
         return render.sorry(request)
     if is_editing(request) and self.can_change.passes(request):
         r = render.EditManyReportRenderer(request,True,self)
     else:
         r = render.ViewManyReportRenderer(request,True,self)
     return r.render_to_response()
Example #4
0
 def view_many(self, request):
     #~ msg = "Hello, "+unicode(request.user)
     #~ print msg
     #~ request.user.message_set.create(msg)
     if not self.can_view.passes(request):
         return render.sorry(request)
     if is_editing(request) and self.can_change.passes(request):
         r = render.EditManyReportRenderer(request, True, self)
     else:
         r = render.ViewManyReportRenderer(request, True, self)
     return r.render_to_response()
Example #5
0
 def print_one(self,request,row):
     if not self.can_view.passes(request):
         return render.sorry(request)
     return render.PdfOneReportRenderer(row,request,True,self).render(as_pdf=False)
Example #6
0
 def print_many(self, request):
     if not self.can_view.passes(request):
         return render.sorry(request)
     return render.PdfManyReportRenderer(request,True,self).render(as_pdf=False)
Example #7
0
 def print_one(self, request, row):
     if not self.can_view.passes(request):
         return render.sorry(request)
     return render.PdfOneReportRenderer(row, request, True,
                                        self).render(as_pdf=False)
Example #8
0
 def print_many(self, request):
     if not self.can_view.passes(request):
         return render.sorry(request)
     return render.PdfManyReportRenderer(request, True,
                                         self).render(as_pdf=False)