Any database retrieve query that i do returns nothing, what may I be doing wrong?
I have been able to get my database queries to work properly for
deleting existing entries and also adding new entries to the database
but I am completely stumped as to why I am unable to retrieve anything
from my database. I am trying a query such as:
from web1.polls.models import Poll
retquery = Poll.objects.all()
print retquery
--prints: "[ ]"
Also, if I try this, it just returns "poll object"
from web1.polls.models import Poll
retquery = Poll.objects.all()[0]
print retquery
--prints: "poll object"
I have looked at everything and there are definitely entries in the
database, I have tried this with a number of different models where
everything else is working otherwise so I don't know what I can do at
this point, any advice is greatly appreciated
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home