예제 #1
0
 def get(self, display_type, key):
     serie = datamodel.find(key)
     if (serie):
         if (display_type == 'image' and serie.picture):
             self.response.headers['Content-Type'] = 'image/png'
             self.response.out.write(serie.picture)
         elif (display_type == 'thumbnail' and serie.thumbnail_pict):
             self.response.headers['Content-Type'] = 'image/png'
             self.response.out.write(serie.thumbnail_pict)
     else:
         self.redirect('/static/noimage.jpg')
예제 #2
0
 def get(self):
     key = self.request.get('key')
     template_values = {'serie': datamodel.find(key)}
     self.generate('editSerie.html', template_values);
예제 #3
0
 def ajaxViewSerie(self, *args):
     key = args[0]
     o = datamodel.find(key)
     return o.title