Changes between Initial Version and Version 1 of Ticket #12692


Ignore:
Timestamp:
Jan 27, 2010, 8:57:53 AM (15 years ago)
Author:
Russell Keith-Magee
Comment:

#12704 was a duplicate. Updated ticket title to be more explicit.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12692

    • Property Triage Stage UnreviewedDesign decision needed
    • Property Summary shortcoming in the new admin inlinesWrong interpretation of extra clause in ModelAdmin with new admin UI
  • Ticket #12692 – Description

    initial v1  
    1 Let me describe the situation: In the current admin you can specify max_num and extra for inlines. Before r12297 this meant that you would get the current data from the database + `extra` as long as it stays below `max_num`. If you were still below `max_num` you had to save the page to get `extra` new fields (this could be repeated until you reached the limit). This behaviour is currently implemented with the js too; but I think (as js is a usability enchancement) you should be able to add as many rows until you reach `max_num` not TOTAL-FORMS (which is rows+`extra` while <= max_num). To get this working I guess we would need to pass max_num to the js so it can decide when to stop.
     1In the current admin you can specify max_num and extra for inlines. Before r12297 this meant that you would get the current data from the database + `extra` as long as it stays below `max_num`. If you were still below `max_num` you had to save the page to get `extra` new fields (this could be repeated until you reached the limit). This behaviour is currently implemented with the js too; but I think (as js is a usability enchancement) you should be able to add as many rows until you reach `max_num` not TOTAL-FORMS (which is rows+`extra` while <= max_num). To get this working I guess we would need to pass max_num to the js so it can decide when to stop.
     2
     3
     4----
     5An alternate description from #12704:
     6
     7
     8The new javascript-enabled admin UI appears have an unusual interpretation of the 'extra' clause on a ModelAdmin?.
     9
     10The current code interprets 'extra = N' as "allow the user to add no more than N extra rows. The user must press (+ add another XXX) to add the first inline.
     11
     12I would have thought the interpretation would have been "instantiate the form with with N empty extra rows". The task of constraining the number of allowed inlines is the job of the 'max_num' clause.
     13
     14The admin UI should always show N blank inputs (for extra = N), as long as that wouldn't exceed the max_num. The user should be able to fill in up to N inlines before needing to press the (+ add another) button.
     15
     16If I'm incorrect, then the second failing test reported by #12703 needs to be fixed by accounting for the 5 fields (and missing default date) that are no longer on the form.
Back to Top