I am trying to learn from "my tiny website" app and use the slide show that
it is used there in the "images/images.html" view.
I created a new view like default/mynewpage.html and copied
"images/images.html" view into it; when I ran it there was an error "
"images" is not defined.
I did some debugging, I found out it is about line 10 in the
"images/images.html" view that causes this error:
{{for index,image in enumerate(images):}}
the whole view is like this:
{{extend 'layout.html'}}
{{for page in pages:}}
<div class="container">
<div class="row">
<div class="span12">
<div id="myCarousel{{=page.id if page else 0}}"
class="carousel slide">
<!--<ol class="carousel-indicators">
{{for index,image in enumerate(images):}}
<li data-target="#myCarousel{{=page.id if page
else 0}}" data-slide-to="{{=index}}"{{if index==0:}}
class="active"{{pass}}></li>
{{pass}}
</ol>-->
<!-- Carousel items -->
<div class="carousel-inner">
{{for index,image in enumerate([i for i in images
if i.page==page]):}}
{{if index==0:}}
<div class="item active">
{{else:}}
<div class="item">
{{pass}}
{{if auth.has_membership('manager'):}}
{{=manager_toolbar(image.id)}}
{{pass}}
<img
src="{{=URL('static','images/photo_gallery/%s' %(image.file))}}">
</div>
{{pass}}
</div>
<!-- Carousel nav -->
<a class="left carousel-control"
href="#myCarousel{{=page.id if page else 0}}" data-slide="prev">‹</a>
<a class="right carousel-control"
href="#myCarousel{{=page.id if page else 0}}" data-slide="next">›</a>
</div>
</div>
</div>
</div>
</div>
{{pass}}
what's happening here is that it looks like the "image" table that has
"images" field in it is not accessible by my new page; any help or
suggestion to debug this? thanks...
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.