Changes between Initial Version and Version 1 of Ticket #27280, comment 8


Ignore:
Timestamp:
Sep 28, 2016, 9:51:17 AM (8 years ago)
Author:
Michael

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27280, comment 8

    initial v1  
    11Replying to [comment:7 Tim Graham]:
    22> 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
     4What is the first part of the example you mentioned?
     5
     6Is 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()
     19False
     20}}}
     21
    322
    423Please, look here. Answer one particular question: is initial data misleading here or not? If it is, let's change something.
Back to Top