Changes between Initial Version and Version 1 of Ticket #27280, comment 8
- Timestamp:
- Sep 28, 2016, 9:51:17 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27280, comment 8
initial v1 1 1 Replying to [comment:7 Tim Graham]: 2 2 > It is necessary. Going back to my first comment on the ticket: "you should pass the same `initial` when processing formset data so that `form.has_changed()` works properly." 3 4 What is the first part of the example you mentioned? 5 6 Is this what you mean? 7 8 9 {{{ 10 >>> data = { 11 ... 'form-TOTAL_FORMS': '1', 12 ... 'form-INITIAL_FORMS': '0', 13 ... 'form-MAX_NUM_FORMS': '', 14 ... 'form-0-title': '', 15 ... 'form-0-pub_date': '', 16 ... } 17 >>> formset = ArticleFormSet(data) 18 >>> formset.has_changed() 19 False 20 }}} 21 3 22 4 23 Please, look here. Answer one particular question: is initial data misleading here or not? If it is, let's change something.