Le 01/10/2015 17:26, Alex Glaros a écrit :
> sure, I copied your view exactly, but is there anything different in
> the view that you tested on your side?
> |
> {{extend 'layout.html'}}
> <dl>
>  <dt>City</dt>
>  <dd>{{=city}}</dd>
>  <dt>Region</dt>
>  <dd>{{=region}}</dd>
>  <dt>Country</dt>
>  <dd>{{=country}}</dd>
> </dl>
> |
>
> Do I need to define "city" in my controller?  I get this error:
>
>
>         <type 'exceptions.NameError'> name 'city' is not defined
>

As a learned lesson, you need to make sure of its availability :

    {{city = globals().get('city', '')}}

in the view. I guess you will have the same error with the other
variables.

Good luck,

-- 
“One original thought is worth a thousand mindless quotings.”
“Le vrai n'est pas plus sûr que le probable.”

                                              Diogene Laerce


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to