src/core/models/notice.py
changeset 55 bcbd95da9be2
parent 48 f4fadc1b9d70
child 175 7331ecc46cba
equal deleted inserted replaced
54:040d7a2adb27 55:bcbd95da9be2
    89     tico        = models.TextField(null=True, blank=True)
    89     tico        = models.TextField(null=True, blank=True)
    90     titr        = models.TextField(null=True, blank=True)
    90     titr        = models.TextField(null=True, blank=True)
    91     util        = models.CharField(max_length=1024, null=True, blank=True)
    91     util        = models.CharField(max_length=1024, null=True, blank=True)
    92     video       = models.CharField(max_length=2048, null=True, blank=True)
    92     video       = models.CharField(max_length=2048, null=True, blank=True)
    93     www         = models.CharField(max_length=512, null=True, blank=True)
    93     www         = models.CharField(max_length=512, null=True, blank=True)
       
    94     
       
    95     def thumbnails(): #@NoSelf
       
    96         doc = """Docstring""" #@UnusedVariable
       
    97        
       
    98         def fget(self):
       
    99             return [img for img in self.images.all() if img.url.split('.')[-2].endswith("_v")]
       
   100                       
       
   101         return locals()
       
   102        
       
   103     thumbnails = property(**thumbnails())
    94 
   104 
    95     class Meta:
   105     class Meta:
    96         app_label = 'core'
   106         app_label = 'core'
    97 
   107 
    98 class NoticeImage(models.Model):
   108 class NoticeImage(models.Model):