<s> from django . db import models <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from cms . models import CMSPlugin <EOL> from cmsplugin_filer_image . models import ThumbnailOption <EOL> class VimeoVideo ( CMSPlugin ) : <EOL> url = models . URLField ( _ ( "<STR_LIT>" ) ) <EOL> alt = models . CharField ( _ ( "<STR_LIT>" ) , max_length = <NUM_LIT:255> , blank = True , null = True , help_text = _ ( "<STR_LIT>" ) ) <EOL> thumbnail_option = models . ForeignKey ( ThumbnailOption , verbose_name = _ ( "<STR_LIT>" ) ) <EOL> def __unicode__ ( self ) : <EOL> return u"<STR_LIT:%s>" % self . url <EOL> @ property <EOL> def vimeo_id ( self ) : <EOL> return self . url [ self . url . rfind ( '<STR_LIT:/>' ) + <NUM_LIT:1> : ] <EOL> @ property <EOL> def dimensions ( self ) : <EOL> if not self . thumbnail_option : <EOL> return [ None , None ] <EOL> return [ self . thumbnail_option . width , self . thumbnail_option . height ] <EOL> @ property <EOL> def width ( self ) : <EOL> return self . dimensions [ <NUM_LIT:0> ] <EOL> @ property <EOL> def height ( self ) : <EOL> return self . dimensions [ <NUM_LIT:1> ] <EOL> class Meta : <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> verbose_name_plural = _ ( "<STR_LIT>" ) </s>
