Re: Getting specific related objects via URL variable

2008-01-07 Thread Emil
Thanks alex, I think I'll leave it as-is for now, just getting my teeth cut on writing some simple template tags of my own but I haven't quite figured it all out yet. I'm so glad this list exists though. :-) //emil On 4 Jan, 23:41, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How about a tem

Re: Getting specific related objects via URL variable

2008-01-04 Thread [EMAIL PROTECTED]
How about a template tag? Pass it the image name and have it set a var to the correct image. On Jan 4, 3:29 pm, Emil <[EMAIL PROTECTED]> wrote: > Thanks Alex, I'm not quite sure what you mean, but I actually gave it > another go and got something working. I'm passing the value from the > image_d

Re: Getting specific related objects via URL variable

2008-01-04 Thread Emil
Thanks Alex, I'm not quite sure what you mean, but I actually gave it another go and got something working. I'm passing the value from the image_detail GET-variable ("products/productname/?image_detail=1") along with the extra_context to the variable, and looping over the image set comparing the v

Re: Getting specific related objects via URL variable

2008-01-04 Thread Alex Koshelev
Select needed image object from base and pass it explicitly to template context On 4 янв, 23:43, Emil <[EMAIL PROTECTED]> wrote: > Greetings, fellow Djangonauts. > > Some background to my question: > I'm building a site where I have Products that each can have one or > more Images (related via a

Getting specific related objects via URL variable

2008-01-04 Thread Emil
Greetings, fellow Djangonauts. Some background to my question: I'm building a site where I have Products that each can have one or more Images (related via a Product f.k on the Image side). The product images are default ordered by a SmallIntegerField with a priority rating (of 1-5, 5 being highe