Changes between Version 1 and Version 2 of Ticket #28950
- Timestamp:
- Dec 20, 2017, 10:56:08 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28950 – Description
v1 v2 1 1 I have models Foo and Bar for example: 2 2 3 {{{ 3 4 class Foo(models.Model): 4 5 .... … … 7 8 foo = models.OneToOneField(Foo) 8 9 required_field = models.CharField(blank=False) 9 10 }}} 10 11 11 12 and in the admin.py i have: 12 13 14 {{{ 13 15 class BarInline(admin.StackedInline): 14 16 model = Bar … … 17 19 class FooAdmin(admin.ModelAdmin): 18 20 inlines = [BarInline] 19 21 }}} 20 22 21 23 Now the issue is on the save form in admin, if i try to create foo instance without providing any bar data in barinline form, i get error that bar's required field is required and if i make all fields optional, it creates the bar instance anyway without any data. I have played with min_num and max_num but in vain.