On Thu, Mar 17, 2016 at 2:17 PM, Tim Graham <timogra...@gmail.com> wrote:
> It seems useful, but I'm not sure if it increases the coupling between model
> and forms in an undesirable way?

The coupling is already there because model fields sit right
in-between the db and form fields, so I don't know if it would
actually /increase/ the coupling.

Another way is to extract out all form related methods from model
fields (value_from_object(), save_form_data(), formfield()) into a new
class.

Then instead of this model:

dbfield -> model field <- formfield

You'd have:

form field
            \
           modelformfield
              |
           model field
           /
dbfield

modelformfield would have the formfield(), value_from_object(), and
save_form_data().

Anyway, are you sure it's not another issue ? I mean, even if we
decide to move formfield(), shouldn't it have overridable defaults ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CALC3KaeDx%3DN0wb5t_LjxNPaSBZa_buZxS2RLCpgDN6yx87-JOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to