This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
LICENSE.txt | Thu Mar 12 13:15:46 -0700 2009 | |
| |
README.markdown | ||
| |
example/ | Sat Nov 28 01:55:05 -0800 2009 | |
| |
formfieldset/ | ||
| |
setup.py |
README.markdown
django-formfieldset is a simple Django app that provides a mix-in class for admin-like fieldset rendering.
Features
- Fieldset functionality similar to
ModelAdmin - Shorthand rendering functions with fieldsets
- as
P - as
TABLE - as
UL
- as
- Overrides nothing in
django.forms.Form
Installation
- Add
"django-formfieldset"directory to your Python path. - Add
"formfieldset"to yourINSTALLED_APPStuple found in your settings file. (optional - to be able to run tests) - Create your forms with
FieldsetMixin
Testing & Example
There is an example project in the example/ folder. To run automated tests
for django-formfieldset run the following command in example/ directory:
python manage.py test formfieldset
To run the example project:
python manage.py runserver
Then you can visit http://localhost:8000/ to view the example.
Usage
- Add a
fieldsetsattribute to your form. See admin docs for detailed explanation. - Render your form with fieldset enabled methods:
- You can use
iter_fieldsets()for custom form rendering. It will yieldFieldsetobjects.Fieldsets act as iterators for widgets in them. - You can use
as_fieldset_table(),as_fieldset_ul()andas_fieldset_p()methods that act like built-inas_*method except fieldset support.
- You can use








