This is probably more of a Python question than django, but django
provides the context for my problem.

Requirement: I have got a user defined list of field names (e.g.
field_names=['id','name','description',...]) and I want to pass this
list to the value() method on a QuerySet thereby returning a subset of
the model fields (as a dictionary).

Problem: value() takes individual field names as parameters (e.g.
value('id', 'name,' description'), not a list of field names (e.g.
value(field_names) ). Is there a simple way of passing the list of
field names to the value() method or is there an alternative strategy
for returning the subset of fields from the QuerySet?

Hopefully this is obvious to someone, but it has me stumped.

Richard


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to