Changes between Initial Version and Version 1 of Ticket #9107, comment 6


Ignore:
Timestamp:
May 6, 2020, 12:33:14 AM (4 years ago)
Author:
TapanGujjar

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9107, comment 6

    initial v1  
    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
     1For 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 
     3for e.g.
     4{{{
     5class choiceInline(admin.TabularInline):
     6    model=Choice
     7    extra=2
     8    # exclude=['votes']
     9
     10class 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
     19query parameter can be like
     20inlinemode_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
     22The 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
     24Should we override the extra parameter through the query parameter?
     25
Back to Top