mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Speedup inlines using autocomplete field and add more previews (#38)
This commit is contained in:
@@ -120,6 +120,9 @@ class RollingStock(models.Model):
|
||||
def get_absolute_url(self):
|
||||
return reverse("rolling_stock", kwargs={"uuid": self.uuid})
|
||||
|
||||
def preview(self):
|
||||
return self.image.first().image_thumbnail(350)
|
||||
|
||||
def country(self):
|
||||
return str(self.rolling_class.company.country)
|
||||
|
||||
|
Reference in New Issue
Block a user