Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-08 Thread Brian Beck
Ramdas S wrote: One question, validators are supposed to get deprecated once the new forms becomes the default. How do we use the newforms validation to do this? Hmm. I actually rather liked django.core.validators. My guess is that it's not currently possible to predict how this will be done

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-08 Thread Ramdas S
One question, validators are supposed to get deprecated once the new forms becomes the default. How do we use the newforms validation to do this? Ramdas On 1/8/07, Brian Beck <[EMAIL PROTECTED]> wrote: > > > Couple more things I discovered... > > This page documents a RequiredIfOtherFieldsNo

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
Couple more things I discovered... This page documents a RequiredIfOtherFieldsNotGiven validator that doesn't actually exist! http://www.djangoproject.com/documentation/forms/#validators (it's close to what you want but not exactly -- you want it to be required if *neither* of the other fields a

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
Whoops, don't forget to add this wherever you put that RequiredIfNoneGiven code: from django.core.validators import gettext_lazy, ValidationError --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
borntonetwork wrote: I have a model object called Customer. It contains the typical attributes/fields you might expect (name, street, apt, city, state, etc). Among these fields are 3 called home_phone, work_phone, and cell_phone. In the admin web interface, I need to ensure that the user must e

Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread borntonetwork
Hi. I have a model object called Customer. It contains the typical attributes/fields you might expect (name, street, apt, city, state, etc). Among these fields are 3 called home_phone, work_phone, and cell_phone. In the admin web interface, I need to ensure that the user must enter data into at