(self, request=None)
return render_to_string('image/render.html', context)
Render.
Render.
Render .
def render(self, request=None):
        """Render."""
        crop = get_crop_filter(self.plugin.data.fit_method)
        # Widget size with 8px cropped in width and height.
        if FIT_METHOD_FIT_WIDTH == self.plugin.data.fit_method:
            thumb_size = (self.get_width() - 8, 0)
        elif FIT_METHOD_FIT_HEIGHT == self.plugin.data.fit_method:
            thumb_size = (0, self.get_height() - 8)
        else:
            thumb_size = self.get_size(-8, -8)

        context = {
            'plugin': self.plugin,
            'MEDIA_URL': settings.MEDIA_URL,
            'crop': crop,
            'thumb_size': 'x'.join([str(_val) for _val in thumb_size])
        }
        return render_to_string('image/render.html', context)
def render ( self , request = None ) : crop = get_crop_filter ( self . plugin . data . fit_method ) # Widget size with 8px cropped in width and height. if FIT_METHOD_FIT_WIDTH == self . plugin . data . fit_method : thumb_size = ( self . get_width ( ) - 8 , 0 ) elif FIT_METHOD_FIT_HEIGHT == self . plugin . data . fit_method : thumb_size = ( 0 , self . get_height ( ) - 8 ) else : thumb_size = self . get_size ( - 8 , - 8 ) context = { 'plugin' : self . plugin , 'MEDIA_URL' : settings . MEDIA_URL , 'crop' : crop , 'thumb_size' : 'x' . join ( [ str ( _val ) for _val in thumb_size ] ) } return render_to_string ( 'image/render.html' , context )