I've found my mistake. View "lista_articoli.html" was not in the "default"
folder.
Il giorno martedì 24 settembre 2013 17:46:22 UTC+2, Gael Princivalle ha
scritto:
>
> Hi.
>
> I'm a web2py newbie.
>
> I'm still trying to adapt the "Image" example with products.
>
> Here is my db:
> db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
> db.define_table('articoli',
> Field('Codice_A', unique=True),
> Field('Descrizione_Breve'),
> Field('Produttore'),
> Field('Path_pdf'))
>
> My controller:
> def lista_articoli():
> articoli = db().select(db.articoli.ALL, orderby=db.articoli.Codice_A)
> return dict(articoli=articoli)
>
> My view: lista_articoli.html
> {{extend 'layout.html'}}
> <h1>Lista articoli</h1>
> <ul>
> {{for articolo in articoli:}}
> {{=LI(A(articolo.Codice_A, _href=URL("show", args=articolo.id)))}}
> {{pass}}
> </ul>
>
> Here is what I have when I go to the lista_articoli.html page:
> Lista Articoli articoli.idarticoli.Codice_Aarticoli.Descrizione_Breve
> articoli.Produttorearticoli.Path_pdf65190106446DSE3-C35SA/11...DUPLOMATIC
> OL...http://www.du...6400040103035600000STVU-08ABROC OIL CONT...
> http://www.hy...
> It's my previous lista_articoli.html page. I've save it but it don't
> change.
>
> Can you help me ?
>
--
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/groups/opt_out.