Hello Stanwin,

On Friday, March 2, 2012 10:05:32 PM UTC-8, St@n wrote:

Hello,
>
> I was just tidying up on my project when i discovered a small bug.
>
> the last one being a queryset. 
>
> *So the forms.py looks like this:*
>
>     keywords = 
> forms.ModelMultipleChoiceField(queryset=Keyword.objects.all())**
>
 
>
*However, the output becomes like the screenshot below:*
>

The keyword items being displayed as "Keyword object" are probably because 
you need to define a __unicode__ method for your Keyword model.

Something like this...

    def __unicode__ ( self ):
    
        return '%s' % self.pk

Obviously you would need to tune that method to match your model definition 
and what you want displayed.

Toodle-looooooooooooo..............
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/tpQDzaxafV0J.
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