Re: Select_related and foreign keys

2009-08-05 Thread Malcolm Tredinnick
On Wed, 2009-08-05 at 18:27 +1000, Brian May wrote: > On Wed, Aug 05, 2009 at 04:34:49PM +1000, Malcolm Tredinnick wrote: > > since it returns a *new* queryset that you cannot save to anything in > > the template. > > errr... What about: > > {% with object.object_set.select_related as set %} > .

Re: Select_related and foreign keys

2009-08-05 Thread Brian May
On Wed, Aug 05, 2009 at 04:34:49PM +1000, Malcolm Tredinnick wrote: > since it returns a *new* queryset that you cannot save to anything in > the template. errr... What about: {% with object.object_set.select_related as set %} ... {% endwith %} ? Also, correct me if I am wrong, but wouldn't i

Re: Select_related and foreign keys

2009-08-04 Thread Malcolm Tredinnick
On Tue, 2009-08-04 at 09:05 -0700, Joe LB wrote: > Hi all, > > I'm trying to access the related objects in the template by using > > {{ _set.select_related}} This isn't particularly useful in a template. Select_related() doesn't change the values you have access to and it isn't going to s

Select_related and foreign keys

2009-08-04 Thread Joe LB
Hi all, I'm trying to access the related objects in the template by using {{ _set.select_related}} this works but as its not an instance and it's a query object I get [] What do I use to just display the string not the object code. Thanks, Joseph --~--~-~--~~