Hi,

On Oct 24, 10:53 am, Kayode Odeyemi <[email protected]> wrote:
> I'm sorry but it doesn't just seem to work for me. I have tried
>
> possibilities like:
>
> self.fields['branch_name'].choices =
> Branch.objects.all().values('name_branch', 'name_branch')
> self.fields['branch_name'].choices =
> Branch.objects.all().values('name_branch')

I don't think you've read Tom's responses carefully. You're still
trying to use ".values()" here, resulting in a ValuesQuerySet which
returns dictionaries instead of a regular QuerySet which returns model
objects. That simply won't ever work. And that is the reason for the
"need more than one value to unpack" error; it has to do with the
format of the results returned, nothing to do with how many results
are returned by the query.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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