1 | | For this feature, the correct query parameter for inline models according to me should look something as inlinemode_set-[**inline model index**]-[**index of the inline formset**]-[**fieldname**]. Also, should the inline parameters override the extra parameter in the custom inline Model as if we have more inline query parameters means for the inline mode we will have to show more inline form just to show those more query parameters |
| 1 | For this feature, the correct query parameter for inline models according to me should look something as inlinemode_set-[**inline model index**]-[**index of the inline model form in the inline formset**]-[**fieldname**]. Also, should the inline parameters override the extra parameter in the custom inline Model as if we have more inline query parameters means for the inline model we will have to show more inline form just to show those more query parameters? |
| 2 | |
| 3 | for e.g. |
| 4 | {{{ |
| 5 | class choiceInline(admin.TabularInline): |
| 6 | model=Choice |
| 7 | extra=2 |
| 8 | # exclude=['votes'] |
| 9 | |
| 10 | class QuestionAdmin(admin.ModelAdmin): |
| 11 | fieldsets = [ |
| 12 | (None, {'fields': ['question_text']}), |
| 13 | ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}), |
| 14 | ] |
| 15 | inlines=[choiceInline] |
| 16 | |
| 17 | }}} |
| 18 | |
| 19 | query parameter can be like |
| 20 | inlinemode_set-0-0-choiceModelField where the first 0 points to the first element in the inlines array (choiceInline) and the second 0 is the first form in inline formset. |
| 21 | |
| 22 | The issue here is that if the query parameter is inlinemode_set-0-3-choiceModelField , this points to the 4th form in the choiceinline formset, this will need to override the extra parameter. |
| 23 | |
| 24 | Should we override the extra parameter through the query parameter? |
| 25 | |