Exemplo n.º 1
0
 def video_list(self):
     qry = VideoQuery(
         " v.videoId, v.flvHref, v.flvThumbNailHref, v.title,v.userId,v.createDate"
     )
     qry.specialSubjectId = self.specialSubject.specialSubjectId
     v_list = qry.query_map(5)
     if len(v_list) > 0:
         request.setAttribute("video_list", v_list)
Exemplo n.º 2
0
 def show_specialsubject_video_list(self):
     qry = VideoQuery(
         " v.videoId, v.flvHref, v.flvThumbNailHref, v.title,v.userId,v.createDate"
     )
     qry.specialSubjectId = self.specialSubject.specialSubjectId
     pager = self.params.createPager()
     pager.itemName = u"视频"
     pager.itemUnit = u"个"
     pager.pageSize = 20
     pager.totalRows = qry.count()
     video_list = qry.query_map(pager)
     request.setAttribute("video_list", video_list)
     request.setAttribute("pager", pager)
     request.setAttribute("specialSubject", self.specialSubject)
     request.setAttribute("subject", self.subject)
     request.setAttribute("head_nav", "specialsubject")
     return "/WEB-INF/subjectpage/" + self.templateName + "/show_video_list.ftl"