I found *Massimo's videos* from 10 years ago! Reading the Web2py book first 
was like figuring out how a refrigerator works from the wiring diagram.  I 
get it now. 

On Friday, August 11, 2023 at 12:55:48 PM UTC-4 Douglas Krueger wrote:

> Hi, new to Web2py, going through the book, currently on chapter 7. I'm 
> trying to get both the linkto (person's dogs) link to display on the view 
> and to *not *display the person.image.filename. It seems if I allow  
> person.image.filename to be displayed then the file name from the image 
> doesn't get stored in the DB. Is this normal behavior? I'm sure I'm doing 
> something wrong. Any help would be appreciated. 
>
> def forms():
>     record = db.person(request.args(0))
>     url = URL('download')
>     link = URL('list_records', args='db')
>     form = SQLFORM(db.person, record, deletable=True, upload=url,
>                   *linkto*=link, labels = {'dog.owner':"This person's 
> dogs"}),
>                   *fields*=['name', 'gender', 'married', 'profile', 
> 'image'])
>     if request.vars.image != None:
>         form.vars.image_filename = request.vars.image.filename
>     if form.process().accepted:
>         response.flash = 'form accepted'
>     elif form.errors:
>         response.flash = 'form has errors'
>     return dict(form=form)
>
> In general, I'm not clear what can sent back and forth between a 
> controller and a view and it does that. Lot's of print statements to aid 
> but slow going. Is there a resource for dummies? Much appreciated. 
>
> Sorry if this double posted. I can't find the first one. 
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/79ce6104-7d79-48ad-9508-c3b51b5070a3n%40googlegroups.com.

Reply via email to