I should re-state my problem.  With web2py I wasn't using session, but
response.  I added a couple of attributes that always got added to the
response object.  Not sure how to mimic that in py4web, or would I even
want to?

-Jim

On Fri, Jan 17, 2020 at 11:16 AM Jim S <ato.st...@gmail.com> wrote:

> Hi
>
> I'm trying to pass a session variable to layout.html but it tells me that
> session is not available:
>
> NameError: name 'session' is not defined
>
> I use this technique in web2py to send a page title to layout.html without
> having to pass it in the returned dict from the controller.
>
> Obviously I'm being lazy using this technique.  Will this work with py4web
> or is it best for me to pass in explicitly in each controller?
>
> -Jim
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/cgg6M7B_wkI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/8848279b-e889-4b9b-90a6-664813a47b89%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/8848279b-e889-4b9b-90a6-664813a47b89%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAERBpoBQPW5KvAs00YWV2LNDgFDWchQs5XH4%3DPkgYTp4VskoMQ%40mail.gmail.com.

Reply via email to