Django-floppyforms 1.0 released

June 11, 2012 Tags: django-community, django

Django-floppyforms 1.0 released

I just pushed django-floppyforms 1.0 to the cheese shop. The previous version (0.4.7) was published quite some time ago and a couple of things happened since then.

What is django-floppyforms?

This project started from too much frustration trying to customize form widgets in Django. It lets you customize the output of forms using Django templates instead of python code.

So, what's new in 1.0?

  • Gregor Mülleger did a GSoC project on Django last summer, aiming to switch Django forms to template-based rendering. His work didn't get merged in Django itself for performance concerns with regards to the Django Template Language but has been added to floppyforms by Jannis Leidel. There is now a nice layout API that lets you completely customize the way forms are rendered.
  • As a side effect, Jannis and Gregor are core committers on the project!
  • Django 1.2 support was dropped, only Django 1.3 and above are supported.
  • Select widgets now support <optgroup>. This change is backwards-incompatible if you have any custom templates for Select widgets and friends (SelectMultiple, CheckboxSelectMultiple, etc.) Keep an eye on them while upgrading.
  • Various areas of the code are now more robust and better tested.

If you are hesitant to use it because of possible performance regressions, just keep in mind that performance was an issue in some very specific cases: forms with hundreds of fields for instance. If you mostly have simple forms, you shouldn't notice the difference. when switching from Django forms.

So, please upgrade, have fun, report bugs and give us feedback on the new forms API!

Comments

June 12, 2012Aamir Maniar

Hey Bruno

It looks good, one question! Do you have tutorial or screen-casts to get started?

Best Regards
Aamir Maniar

TechnoBits Trace-back:
http://www.technobits.net/articles/29868/djangofloppyforms-10-released/

June 12, 2012bruno

@Aamir: I don't have any screencast but the documentation is pretty extensive:

http://django-floppyforms.readthedocs.org/en/latest/index.html

June 12, 2012sam

Hi Bruno,

I'm looking for a comparison between the floppyforms layout api and the crispy-form one (http://django-crispy-forms.readthedocs.org/en/d-0/tags.html#layouts). It's not exactly the same, but it seems to me that they go in the same direction. I use both of these librairies, they do great job, and I would like to have your point of view about this.

Thanks

sam

June 12, 2012bruno

@sam: crispy-forms lets you define layouts in python code. This works in lots of situations but floppyforms is especially useful when you have frontend people who aren't python developers. They can work on form rendering just using templates, no python code is required.

So yeah, they mostly do the same things. But they're not targeting the same end developers. Some people feel more comfortable working with templates, others prefer python.

Add a comment

Comments are closed for this entry.