Ejemplo n.º 1
0
 def _process(self):
     form = AddImagesForm()
     return WPImages.render_template('images.html',
                                     self._conf,
                                     images=get_images_for_event(
                                         self._conf),
                                     event=self._conf,
                                     form=form)
Ejemplo n.º 2
0
 def clone(self, new_event, options):
     from indico.modules.events.layout.models.images import ImageFile
     if 'images' not in options:
         return
     for old_image in get_images_for_event(self.event):
         new_image = ImageFile(event_id=new_event.id,
                               filename=old_image.filename,
                               content_type=old_image.content_type)
         with old_image.open() as fd:
             new_image.save(fd)
         db.session.add(new_image)
         db.session.flush()
         logger.info('Added image during event cloning: {}'.format(new_image))
Ejemplo n.º 3
0
 def clone(self, new_event, options):
     from indico.modules.events.layout.models.images import ImageFile
     if 'images' not in options:
         return
     for old_image in get_images_for_event(self.event):
         new_image = ImageFile(event_id=new_event.id,
                               filename=old_image.filename,
                               content_type=old_image.content_type)
         with old_image.open() as fd:
             new_image.save(fd)
         db.session.add(new_image)
         db.session.flush()
         logger.info(
             'Added image during event cloning: {}'.format(new_image))
Ejemplo n.º 4
0
def _render_image_list(event):
    return render_template('events/layout/image_list.html',
                           images=get_images_for_event(event))
Ejemplo n.º 5
0
 def _process(self):
     form = AddImagesForm()
     return WPImages.render_template('images.html', self._conf, images=get_images_for_event(self._conf),
                                     event=self._conf, form=form)
Ejemplo n.º 6
0
def _render_image_list(event):
    return render_template('events/layout/image_list.html', images=get_images_for_event(event))