max_num, etc. for inline models in newforms-admin
|Reported by:||yserrano||Owned by:||brosner|
|Cc:||densetsu.no.ero.sennin@…, brooks.travis@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||yes|
The max_num feature is missing in the newforms-admin branch. When you add max_num to your Child_Inline max_num doesn't do anything.
from django.contrib import admin class Child_Inline(admin.TabularInline): model = Child extra = 3 max_num = 5
I looked at the code in django/contrib/admin/options.py and it seems that there is no max_num feature there.
I added a patch with the missing functionality. I'm not sure if it's the best way to do it, especially the line with apply in it.
Change History (7)
Changed 7 years ago by yserrano
comment:1 Changed 7 years ago by Karen Tracey <kmtracey@…>
- Keywords nfa-blocker added
- Needs documentation set
- Needs tests set
- Patch needs improvement set
- Summary changed from max_num for inline models in newforms-admin to max_num, etc. for inline models in newforms-admin
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 7 years ago by Densetsu no Ero-sennin <densetsu.no.ero.sennin@…>
- Cc densetsu.no.ero.sennin@… added
Changed 7 years ago by ext
comment:3 Changed 7 years ago by brosner
- Owner changed from yserrano to brosner
- Status changed from new to assigned