yes, but it's only for limpidity :) and I need the user to chose only one
option from the list. Just can't count on that user wil chose to fill only
one field with choices if there are more possible fields with choices.
And it isn't possible to add to oe field multiple choices lists (i mena
somethink like choices1 =..., choices2 = ... etc), is it?
Or maybe completely misapprehended what u wrote me :D but really, thanks a
lot anyway :)



Malcolm Tredinnick wrote:
> 
> 
> 
> On Wed, 2008-07-02 at 13:40 -0700, urukay wrote:
>> 
>> is there a way how to create choices in Models in specific way, that some
>> choices are not selectable (they only group and describe choices below)?
>> 
>> e.g.:
>> 
>> CHOICES = (
>>      ('0', 'Basic Colors'),
>>      ('1', 'Red'),
>>      ('2', 'Green'),
>>      ('3', 'Blue'),
>>      ('4', 'Other Colors'),
>>      ('5', 'Brown'),
>>         .....
>> )
>> 
>> and I want "Basic Colors" and "Other Colors" not selectable when
>> displaying
>> CHOICES in model. Is it possible?
> 
> Just pass in the choices you want to the "choices" attribute of the
> model field. Nothing requires you to have all your choices only in a
> single list. And, if later, you wish to combined your various sublists
> into one list for some reason, then just concatenate the individual
> lists.
> 
> Don't over-think this: you want to pass in a particular small list to a
> model field, so just create that list and pass it in. No complex
> technology required.
> 
> Malcolm
> 
> 
> 
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/choices-tp18246312p18254242.html
Sent from the django-users mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to