mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 05:07:50 +02:00
Change image sort, thumbnails first
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = "0.0.21"
|
||||
__version__ = "0.0.22"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.1.3 on 2022-12-28 21:07
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("roster", "0014_alter_rollingstockdocument_file_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="rollingstockimage",
|
||||
options={"ordering": ["-is_thumbnail"]},
|
||||
),
|
||||
]
|
@@ -178,6 +178,9 @@ class RollingStockImage(models.Model):
|
||||
).update(is_thumbnail=False)
|
||||
super().save(**kwargs)
|
||||
|
||||
class Meta:
|
||||
ordering = ["-is_thumbnail"]
|
||||
|
||||
|
||||
class RollingStockProperty(models.Model):
|
||||
rolling_stock = models.ForeignKey(
|
||||
|
Reference in New Issue
Block a user