Re: Newbie Help with Models and Views

2008-12-22 Thread Mike A
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

RE: Newbie Help with Models and Views

2008-12-22 Thread Wayper, Paul
> .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

RE: Newbie Help with Models and Views

2008-12-22 Thread Wayper, Paul
> 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