I want to select the distict value from models field and then update them (django)

Posted by qulzam on Stack Overflow See other posts from Stack Overflow or by qulzam
Published on 2010-03-17T14:21:47Z Indexed on 2010/03/17 14:41 UTC
Read the original article Hit count: 159

Filed under:
|
|

I have models...

class Item(models.Model):
    name = models.CharField('Item Name', max_length = 30)
    item_code = models.CharField(max_length = 10)
    color = models.CharField(max_length = 150, null = True, blank = True)
    size = models.CharField(max_length = 30, null = True, blank = True)
    fabric_code = models.CharField(max_length = 30, null = True, blank = True)    

I have values in Item. in Item model name field has the similar values..(but the other values of record are change). I want to select the name field values distinctly(ie similar values select only ones). in one box(like combo box).

What kind of form or views i use??

© Stack Overflow or respective owner

Related posts about django-models

Related posts about django