#22964: I'm a new user from China,I got a problem with the 'choices' of the 
fields
option.
-------------------------------+-----------------------------------
     Reporter:  zhaoxp1230@…   |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  1.6
     Severity:  Normal         |   Keywords:  fields choices models
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  1              |      UI/UX:  0
-------------------------------+-----------------------------------
 First, I got this error from the terminal :
 main.province: "name": "choices" should be a sequence of two-item
 iterables (e.g. list of 2 item tuples).
 But I don't need two-item,I don't want to use the short description like
 ('S','small'),('L','large').I just want use 'small','large' immediately.

 Second, I tried use it like LIST=(('S','small'),('L','large')) , but I
 don't know how to write the function below:
 class XXX:
 ...
 name=CharField(max_length = 10, choices = LIST)
 ...
 def __unicode__(self):
                 #HOW TO WRITE THE RETURN SCENTENCE???
                 return ????
 I got NONE in the brows where should list the XXX instnce.
 Sorry , I don't know how to use the image option of this site.
 I got 'S' / 'L' in the select form , but I want 'small' / 'large'.this is
 the reason why I don't want to use two-item in the choice LIST.
 Thanks for getting help from you ! I think Django is wonderful. I am
 learning it everyday.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22964>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.100acbf8ad0bd397283fee3a9f36141b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to