Begin SAS

This commit is contained in:
Skia
2016-10-26 19:21:19 +02:00
parent 0b068d3e92
commit d554a5ee8d
14 changed files with 178 additions and 1 deletions

View File

@ -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