Hi Melvyn,

I found your response to the OP interesting, yet I cannot quite follow it.
Even if he sets a unique attribute (presumably Boolean/ Checkbox?), he
would still need a mechanism to filter the result set at runtime? Please
expound?

On Mon, Aug 20, 2012 at 11:12 AM, Melvyn Sopacua <m.r.sopa...@gmail.com>wrote:

> On 20-8-2012 0:16, Joseph Mutumi wrote:
>
> > That particular field at times appears multiple times in the database.
> How
> > do I make it
> > only have distinct values?
> >
> > This is a snippet, drop down will have repeated values if same color is
> > entered:
> >
> > class FavoriteColor(models.Model):
> >     color = models.CharField(max_length=255)
> >
> >     def __unicode__(self):
> >         return self.color
> You should invest in fixing the flaw in the design. Set the unique
> attribute on the color field after you manually remove all duplicates
> from the database.
>
>
> --
> Melvyn Sopacua
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,
Sithembewena Lloyd Dube

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to