danni / django-postgres-composite-types

Postgres composite types support for Django
BSD 3-Clause "New" or "Revised" License
51 stars 13 forks source link

Add CompositeBoundField for improved form handling #2

Closed mx-moth closed 8 years ago

mx-moth commented 8 years ago

You can now do {{ form.composite_field.child_field }} to access the child fields of the composite field in the template, to render them in what ever arrangement you want.

{{ form.composite_field.id_for_label }} returns the ID for the first field in the composite field.

Fields stay populated when a validation error occurs.

danni commented 8 years ago

Nice approach. Only style issues here. I note that #1 regards the lack of tests :)

mx-moth commented 8 years ago

Formatting fixes pushed