Changes between Initial Version and Version 1 of Ticket #28950


Ignore:
Timestamp:
Dec 20, 2017, 10:54:43 AM (7 years ago)
Author:
tejinderss
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28950 – Description

    initial v1  
    11I have models Foo and Bar for example:
    22
    3 class Foo(models.Model):
    4     ....
     3    class Foo(models.Model):
     4        ....
    55
    6 class Bar(models.Model):
    7     foo = models.OneToOneField(Foo)
    8     required_field = models.CharField(blank=False)
     6    class Bar(models.Model):
     7        foo = models.OneToOneField(Foo)
     8        required_field = models.CharField(blank=False)
    99
    1010
    1111and in the admin.py i have:
    1212
    13 class BarInline(admin.StackedInline):
    14     model = Bar
     13    class BarInline(admin.StackedInline):
     14        model = Bar
    1515
    16 @admin.register(Foo)
    17 class FooAdmin(admin.ModelAdmin):
    18     inlines = [BarInline]
     16    @admin.register(Foo)
     17    class FooAdmin(admin.ModelAdmin):
     18        inlines = [BarInline]
    1919
    2020
Back to Top