I want something like this:
if not session.id[page_id]:
session.id[page_id]=str(request.now)
but i get this error: KeyError: '74'
I want to validate if a dynamic variable exists.. if not I want to
create it and to get the time
On Feb 1, 4:17 am, Jason Brower <[email protected]> wrote:
> You can do that. At the top of the default.py or what ever you are using,
> place something like...
> session.pages[request.page] = True
> or how ever you want to do it. Just make sure because it is a dictionary that
> you blank it or initialize it befor asigning anything to it.
>
>
>
>
>
>
>
> ----- Original message -----
> > Hello,
> > I want to have dinamic session variables like this:
> > session.id
> > where id is different from page to page..
>
> > I've tried
> > id = variable
> > session.id
>
> > and
> > session.id['variable']
>
> > without any results.
>
> > I would like to be able to open different pages at the same time and
> > the browser could get all the session variables.