1
0
mirror of https://github.com/django/django.git synced 2024-11-18 23:44:22 +00:00
django/docs/ref/contrib/formtools/index.txt

44 lines
1.5 KiB
Plaintext

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