Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread sime
Encouraging to hear all the feedback here, this was really just a thought provoker (with perhaps a dash of vented frustration). Newforms is great, and it's *nearly* there. Just needs a few key enhancements before it's ready for prime time. No doubt the newforms- admin guys have been noticing this

Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread Pigletto
> If you wanted to use the standard form_for_* functions, that sounds > like something you could solve by creating a BaseForm which overrides > __init__ (taking any extra arguments you require,.e.g. querysets which > specify data to be used to populate a field's choices), and modifies > the form'

Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread Jonathan Buchanan
On 8/14/07, Pigletto <[EMAIL PROTECTED]> wrote: > > > Out of interest, where do you find newforms to be inflexible? Are you > > referring to the form_for_* convenience functions or the bulk of > > newforms itself? > I also found some 'inflexible' places. > > I had a lot of work with form_for_* met

Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread Pigletto
> Out of interest, where do you find newforms to be inflexible? Are you > referring to the form_for_* convenience functions or the bulk of > newforms itself? I also found some 'inflexible' places. I had a lot of work with form_for_* methods. While using form_for_* methods there is only one place

Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread Jonathan Buchanan
> > Instead of throwing around blanket statements about what is broken, > > how about making some concrete suggestions. Saying newforms "needs a > > tonne more flexibility" doesn't give any hint as to what you think > > isn't flexible. > Right. I agree with sime that newforms are not very flexible

Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread Jonathan Buchanan
On 8/14/07, eXt <[EMAIL PROTECTED]> wrote: > > On 14 Sie, 03:47, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: > (...) > > What you have described is three different pieces of information that > > are similar in the trivial case, and one that you don't need to > > manage. > > > > - fields in

Re: DRY? I have a field lists to manage in 4 places

2007-08-14 Thread eXt
On 14 Sie, 03:47, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: (...) > What you have described is three different pieces of information that > are similar in the trivial case, and one that you don't need to > manage. > > - fields in HTML - where you want to put field X. Only required if you >

Re: DRY? I have a field lists to manage in 4 places

2007-08-13 Thread Russell Keith-Magee
On 8/14/07, sime <[EMAIL PROTECTED]> wrote: > > Warning, devils advocate post. It's meant to be constructive > criticism. > > I have my fields listed in HTML, in forms.py (newforms), in models.py, > and in my database (post-syncdb). Four places no less. What you have described is three different

DRY? I have a field lists to manage in 4 places

2007-08-13 Thread sime
Warning, devils advocate post. It's meant to be constructive criticism. I have my fields listed in HTML, in forms.py (newforms), in models.py, and in my database (post-syncdb). Four places no less. Before we shout too much about DRY, newforms _for_model needs a tonne more flexibility, and syncdb