Login

Tag "deprecated"

Snippet List

check if form has changed (deprecated)

This is deprecated. I don't use it anymore, since forms now have the attribute "has_changed". The method form_changed() returns a boolean value. It is True if the submitted values of the bound and valid form are different than the initial values. It works for me. Feedback welcome. Set debug=True if you want to know what's going on.

  • deprecated
Read More

newforms and ModelForm

I noticed that form_for_* in newforms now carry deprecation warnings. This code is a minimal demonstration of how to use ModelForm as a replacement. Full information can be found on [Stereoplex](http://www.stereoplex.com/two-voices/django-modelform-and-newforms). Hope this helps you.

  • newforms
  • form_for_instance
  • modelclass
  • form_for_class
  • deprecated
Read More

3 snippets posted so far.