get it...the template language is not very smart...

On Tue, Dec 2, 2008 at 4:52 PM, Matija <[EMAIL PROTECTED]> wrote:

>
> Solution for your problem is simple. First you need to know that
> template 'language' is not so powerfull that you expect and from my
> point it should not be.
>
> You need to organize data in your class handler in python code before
> you render it with template. In python you can do it on many ways so
> that instead you have one image collection you could have collection
> of collection (max five images for you problem).
>
> In template file than you can have nested for loop.
>
> <table>
> <tbody>
> {% for obj in objects %}
>   <tr>
>    {% for image in obj.images %}
>      <td>{{ image }}</td>
>   {% endfor %}
>   </tr>
> {% endfor %}
> </tbody>
> </table>
>
> On Dec 2, 2:56 am, kang <[EMAIL PROTECTED]> wrote:
> > it does not work..
> > for example I have 100 image objects, and I want to render 5 in each
> > row...how to write the code?
> >
> > <table>
> > <tbody>
> > <tr>
> > <td>1st img</td><td>2nd img </td><td> 3rd img</td><td>4th img</td><td>5th
> > img</td>
> > </tr>
> > <tr><td>6th img</td>.....</tr>
> > </tbody>
> > </table>
> >
> >
> >
> > On Mon, Dec 1, 2008 at 6:30 PM, Matija <[EMAIL PROTECTED]>
> wrote:
> >
> > > <table>
> > > <tbody>
> > > {% for obj in objects %}
> > > <tr>
> > > <td>{{ obj.col1 }}</td><td>{{ obj.col2 }}</td>...
> > > </tr>
> > > {% endfor %}
> > > </tbody>
> > > </table>
> >
> > > On Dec 1, 10:04 am, kang <[EMAIL PROTECTED]> wrote:
> > > > what?
> > > > I want to show 5 objs in each row, how to write the code?
> >
> > > > On Mon, Dec 1, 2008 at 5:01 PM, A. TNG <[EMAIL PROTECTED]> wrote:
> >
> > > > > On Mon, Dec 1, 2008 at 2:27 PM, lookon <[EMAIL PROTECTED]>
> wrote:
> >
> > > > > > I want to render table in the response. and the template_value is
> > > > > > objects. Then my question is how to write the template file.
> >
> > > > > > for example,
> > > > > > {% for obj in objects %}
> > > > > > <table>
> > > > > > <tbody>
> > > > > > code here
> >
> > > > > {{ obj }} dosen't work?
> >
> > > > > > </tbody>
> > > > > > </table>
> > > > > > {% endfor %}
> >
> > > > > --
> > > > > Best Regards,
> > > > > TANG Jiyu (Blog:http://jiyu.wordpress.com.cn)
> >
> > > > --
> > > > Stay hungry,Stay foolish.
> >
> > --
> > Stay hungry,Stay foolish.
> >
>


-- 
Stay hungry,Stay foolish.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to