def getLayout(self, index): identifier, layout_info = self.session.query(frontpage_layout.params, frontpage_layout.layout_info).\ filter(frontpage_layout.layout_index==index).one() if layout_info is None: return None from layout_gen import generateFullLayoutJson layout = generateFullLayoutJson(layout_info) #self.convertMediaType(layout) return identifier, layout
def getLayout(self, index): identifier, layout_info = self.session.query(frontpage_layout.params, frontpage_layout.layout_info).\ filter(frontpage_layout.layout_index==index).one() if layout_info is None: return None from layout_gen import generateFullLayoutJson layout = generateFullLayoutJson(layout_info) #self.convertMediaType(layout) return identifier, layout
def getLayout(self, index): '''get the layout information from database, the layout information is stored as XML, use layout generation tool to get a json format layout, the layout information only contain the number of poster number and position for each poster the function also return the layout identifier information, which is used by VIDAA to identify which layout is used, since VIDAA will not care the position of each poster ''' identifier, layout_info = self.session.query(frontpage_layout.params, frontpage_layout.layout_info).\ filter(frontpage_layout.layout_index==index).one() if layout_info is None: return None from layout_gen import generateFullLayoutJson layout = generateFullLayoutJson(layout_info) #self.convertMediaType(layout) return identifier, layout