Paul,
Thanks for the help. I switched to the get method, and the data
prints correctly now. Thanks!
-Mike
On Dec 22, 5:44 pm, "Wayper, Paul"
wrote:
> > .filter returns a list of the items that match the query. So
> > you're trying to stringify a list. That's where the '[' and
> > ']' are c
> .filter returns a list of the items that match the query. So
> you're trying to stringify a list. That's where the '[' and
> ']' are coming from.
I should have mentioned that the get method (e.g. Post.objects.get(id =
1)) will return a single object, or raise a DoesNotExist error. You may
> From: Mike Albert
> Subject: Newbie Help with Models and Views
>
> I have a couple test rows of data in my database. From the
> interactive shell (manage.py shell), I can return data correctly with
> Post.objects.filter(id=1).
You'll notice that that data is coming back as ['row 1']. It's i
3 matches
Mail list logo