Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oddbloke/django-formfieldset
Fieldset Rendering For Non-Admin Forms
https://github.com/oddbloke/django-formfieldset
Last synced: 25 days ago
JSON representation
Fieldset Rendering For Non-Admin Forms
- Host: GitHub
- URL: https://github.com/oddbloke/django-formfieldset
- Owner: OddBloke
- License: bsd-3-clause
- Created: 2009-03-12T12:40:46.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2009-05-19T13:49:14.000Z (over 15 years ago)
- Last Synced: 2023-04-14T02:16:11.007Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 86.9 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE.txt
Awesome Lists containing this project
README
**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`
* Overrides nothing in `django.forms.Form`Installation
============1. Add 'django-formfieldset' directory to your Python path.
2. Add 'formfieldset' to your `INSTALLED_APPS` tuple
found in your settings file. (optional - to be able to run tests)
3. Create your forms with `FieldsetMixin`Usage
=====* Add a `fieldsets` attribute to your form. See [admin docs][ref1] for
detailed explanation.
* Render your form with fieldset enabled methods:
* You can use `iter_fieldsets()` for custom form rendering. It will yield
`Fieldset` objects. `Fieldset`s act as iterators for widgets in them.
* You can use `as_fieldset_table()`, `as_fieldset_ul()` and
`as_fieldset_p()` methods that act like built-in `as_*` method except
fieldset support.[ref1]: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#fieldsets