Ticket #24851: 24851-test.diff

File 24851-test.diff, 989 bytes (added by Tim Graham, 9 years ago)
  • tests/admin_changelist/admin.py

    diff --git a/tests/admin_changelist/admin.py b/tests/admin_changelist/admin.py
    index bae857f..99deafc 100644
    a b site.register(Parent, NoListDisplayLinksParentAdmin)  
    107107
    108108class SwallowAdmin(admin.ModelAdmin):
    109109    actions = None  # prevent ['action_checkbox'] + list(list_display)
    110     list_display = ('origin', 'load', 'speed')
     110    list_display = ('origin', 'load', 'speed', 'swallowonetoone')
    111111
    112112site.register(Swallow, SwallowAdmin)
    113113
  • tests/admin_changelist/models.py

    diff --git a/tests/admin_changelist/models.py b/tests/admin_changelist/models.py
    index 2b8d2bc..aa4241c 100644
    a b class Swallow(models.Model):  
    8383        ordering = ('speed', 'load')
    8484
    8585
     86class SwallowOneToOne(models.Model):
     87    swallow = models.OneToOneField(Swallow)
     88
     89
    8690class UnorderedObject(models.Model):
    8791    """
    8892    Model without any defined `Meta.ordering`.
Back to Top