index.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. django.contrib.formtools
  2. ========================
  3. A set of high-level abstractions for Django forms (:mod:`django.forms`).
  4. Historically, Django shipped with ``django.contrib.formtools`` -- a collection
  5. of assorted utilities that are useful for specific form use cases. This code is
  6. now distributed separately from Django, for easier maintenance and to trim the
  7. size of Django's codebase. In Django 1.8, importing from
  8. ``django.contrib.formtools`` will no longer work.
  9. The new formtools package is named ``django-formtools``, with a main module
  10. called ``formtools``. Version 1.0 includes the same two primary features that
  11. the code included when it shipped with Django: a helper for form previews and a
  12. form wizard view.
  13. See the `official documentation`_ for more information.
  14. .. _official documentation: http://django-formtools.readthedocs.org/
  15. .. _formtools-how-to-migrate:
  16. How to migrate
  17. --------------
  18. If you've used the old ``django.contrib.formtools`` package follow these
  19. two easy steps to update your code:
  20. 1. Install version 1.0 of the third-party ``django-formtools`` package.
  21. 2. Change your app's import statements to reference the new packages.
  22. For example, change::
  23. from django.contrib.formtools.wizard.views import WizardView
  24. to::
  25. from formtools.wizard.views import WizardView
  26. The code in version 1.0 of the new package is the same (it was copied directly
  27. from Django), so you don't have to worry about backwards compatibility in terms
  28. of functionality. Only the imports have changed.