summaryrefslogtreecommitdiff
path: root/tests/admin_ordering/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_ordering/models.py')
-rw-r--r--tests/admin_ordering/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/admin_ordering/models.py b/tests/admin_ordering/models.py
index 3da52b1b00..fb99d2dac5 100644
--- a/tests/admin_ordering/models.py
+++ b/tests/admin_ordering/models.py
@@ -11,6 +11,7 @@ class Band(models.Model):
class Meta:
ordering = ('name',)
+
class Song(models.Model):
band = models.ForeignKey(Band)
name = models.CharField(max_length=100)
@@ -20,13 +21,16 @@ class Song(models.Model):
class Meta:
ordering = ('name',)
+
class SongInlineDefaultOrdering(admin.StackedInline):
model = Song
+
class SongInlineNewOrdering(admin.StackedInline):
model = Song
ordering = ('duration', )
+
class DynOrderingBandAdmin(admin.ModelAdmin):
def get_ordering(self, request):