Le jeudi 24 avril 2014 15:10:20 UTC+2, guettli a écrit : > > Hello, > > I want to improve this method: > > django/forms/forms.py: Form.get_changed_data() >
There are no get_changed_data() method currently, I suppose you meant Form.changed_data (property). > > I need to have access to the old data, and would like to have a triple > list like this: > > (field_name, old_value, new_value) > > Code: > https://github.com/django/django/blob/master/django/forms/forms.py#L415 > > My current solution is to subclass Form and overwrite this method. > > This overwrite is mostly a cut+paste of django's implementation and stores > the triple list > on the form instance. > > I guess this triple list would be useful for other people, too. > > What do you think? > > Is there interest do make the above triple list available in django core? > I think it could be an interesting feature. As often, the difficulty might be to find a solution which respects backwards compatibility, which probably means in this case deprecating changed_data and finding a new name. Claude -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/3ed84f78-1df3-4c7b-9755-287c13a9c185%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
