Skip to content

Commit

Permalink
Added management command to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
1stvamp committed Feb 16, 2011
1 parent afbf638 commit c49cd6c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.rst
Expand Up @@ -89,3 +89,13 @@ The following helper functions available in ``dfs.scaffold``:
*as_div*
Extra scaffold-only helper to output an alternative <div> based form layout, similar in layout to ``as_p`` but with <div>s.

Management command
==================

As of v1.1.0 *django-form-scaffold* ships with the management command ``formscaffold``, which acts as a simple wrapper around the scaffold functions.

To use the command just add ``dfs`` to your ``INSTALLED_APPS`` setting and use via ``python manage.py`` (or ``bin/django`` if you're using buildout) like so::

$ python manage.py formscaffold myapp.forms MyForm as_p

This just use the class-based generation functionality of scaffold functions (pass in a class and they init a blank instance), if you need any customisations performing to the form instance before hand, use from within a Django-ized Python shell as above (e.g. with ``manage.py shell``).

0 comments on commit c49cd6c

Please sign in to comment.