thx

On Jul 20, 4:25 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Mon, Jul 20, 2009 at 6:48 AM, Viktor<viktor.n...@gmail.com> wrote:
>
> > Hi,
>
> > I would like to run something like
>
> > ["User",].expand(MyObject.objects.all().values_list('myfield',
> > flat=True)
>
> > but expand seemingly can't handle this operation.
> > I was trying MyValuesListQuerySet.insert, but it fails as well (This
> > is I can understand though. :))
>
> > could someone help me on the best way to combine a list with a
> > valueslistqueryset, please?
>
> > thx, V
>
> List's don't have a method named expand, they have one named extend
> and it should work fine.
>
> a = ['user']
> a.extend(valuelist_queryset)
> print a
> ['user',  ...]
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your
> right to say it." -- Voltaire
> "The people's good is the highest law." -- Cicero
> "Code can always be simpler than you think, but never as simple as you
> want" -- Me
--~--~---------~--~----~------------~-------~--~----~
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