Hello All,
I would like to know if there is a way to exclude fields from an
object query.
For example:
Suppose I have this model.
class Person(Model.model):
name = Charfield()
address = Charfield()
state = Charfield()
etc.... I do realize my syntax is probably wrong, please for
give me.
I want to create a query that will return the state attribute for each
object in the model.
I found a reference to a method called hide in the django
documentation.
It would worked as such:
p = Person.objects.hide('name', 'address', 'etc.').get('state')
However, when I attempted to use the method, I received an error
stating the method does not exist for the Manager. Does anyone know of
another way ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---