mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Speedup inlines using autocomplete field and add more previews (#38)
This commit is contained in:
@@ -60,6 +60,9 @@ class ConsistItem(models.Model):
|
||||
def __str__(self):
|
||||
return "{0}".format(self.rolling_stock)
|
||||
|
||||
def preview(self):
|
||||
return self.rolling_stock.image.first().image_thumbnail(100)
|
||||
|
||||
def type(self):
|
||||
return self.rolling_stock.rolling_class.type
|
||||
|
||||
|
Reference in New Issue
Block a user