Introduction ============ ``django-betterforms`` provides a suite of tools to make working with forms in Django easier. Installation ------------ 1. Install the package:: $ pip install django-betterforms Or you can install it from source:: $ pip install -e git://github.com/fusionbox/django-betterforms@master#egg=django-betterforms-dev 2. Add ``betterforms`` to your ``INSTALLED_APPS``. Quick Start ----------- Getting started with ``betterforms`` is easy. If you are using the build in form base classes provided by django, its as simple as switching to the form base classes provided by ``betterforms``. .. code-block:: python from betterforms.forms import BaseForm class RegistrationForm(BaseForm): ... class Meta: fieldsets = ( ('info', {'fields': ('username', 'email')}), ('location', {'fields': ('address', ('city', 'state', 'zip'))}), ('password', {'password1', 'password2'}), ) And then in your template. .. code-block:: html
{% include 'betterforms/form_as_fieldsets.html' %}
Which will render the following. .. code-block:: html