Hi,
I am trying to retrieve the few cols from auth_user & auth_message
table.
Here is the statement that i am using
User.objects.filter(username=100000).values('username',
'message_user_id', 'message_message')
and ended up with the below error
>>> User.objects.filter(username=100000).values('username', 'message_user_id',
>>> 'message_message')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "c:\Python25\lib\site-packages\django\db\models\query.py", line
452, in values
return self._clone(klass=ValuesQuerySet, setup=True,
_fields=fields)
File "c:\Python25\lib\site-packages\django\db\models\query.py", line
681, in _clone
c._setup_query()
File "c:\Python25\lib\site-packages\django\db\models\query.py", line
799, in _setup_query
self.query.add_fields(self.field_names, False)
File "c:\Python25\lib\site-packages\django\db\models\sql\query.py",
line 2059, in add_fields
"Choices are: %s" % (name, ", ".join(names)))
FieldError: Cannot resolve keyword 'message_user_id' into field.
Choices are: date_joined, email,
emailaddress, first_name, groups, id, is_active, is_staff,
is_superuser, last_login, last_name, logentry, message, password,
user_permissions, userbasicdetails, username
FieldError showing the Choices - message
How can i use that field in values for a query?
Could some one please guide me in resolving the issue.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---