mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Begin SAS
This commit is contained in:
@ -584,6 +584,11 @@ class SithFile(models.Model):
|
||||
else:
|
||||
return super(SithFile, self).__getattribute__(attr)
|
||||
|
||||
@property
|
||||
def as_picture(self):
|
||||
from sas.models import Picture
|
||||
return Picture.objects.filter(id=self.id).first()
|
||||
|
||||
def __str__(self):
|
||||
if self.is_folder:
|
||||
return _("Folder: ") + self.name
|
||||
|
Reference in New Issue
Block a user