Nevermind!
Figured it out.
differently from seeing it as a list of dict in terminal, in the view I had
to use todas.as_list()

:)

Atenciosamente,

Elcimar Leandro
Analista de Suporte, TI JG Telecom/Net Fácil
71 8842-9699, 71 9166-2678
http://twitter.com/simakwm




2011/2/17 Elcimar L. Santos <[email protected]>

> Yes, active = still exists.
>
> I am writing sessions on a db.
>
> I made a query like: todas=db().select(db.web2py_session_chat_basico.ALL)
> In the web2py terminal I can read all session keys through 'todas'
> variable, but in the view 'todas' seems like another kind of object I'm
> having troubles to access. It has even a table header as its first item.
>
> To make myself clear, I'd like to print the client ip address, for example,
> in the view. Like:
> {{ =todas[1]["client_ip"] }}, but I get an error.
>
> In web2py terminal print todas[1]["client_ip"] works fine.
>
>
>
> Atenciosamente,
>
> Elcimar Leandro
> Analista de Suporte, TI JG Telecom/Net Fácil
> 71 8842-9699, 71 9166-2678
> http://twitter.com/simakwm
>
>
>
>
> 2011/2/17 Massimo Di Pierro <[email protected]>
>
> Again. How do you define "active"?
>>
>> The file below provides a condition for deleting sessions files.
>> Perhaps all files that do not meet the criteria should be considered
>> active?
>>
>> On Feb 17, 2:11 pm, "Elcimar L. Santos" <[email protected]>
>> wrote:
>> > Ok, thanks.
>> >
>> > Now how would you list all current sessions for an app?
>> >
>> > Atenciosamente,
>> >
>> > Elcimar Leandro
>> > Analista de Suporte, TI JG Telecom/Net Fácil
>> > 71 8842-9699, 71 9166-2678http://twitter.com/simakwm
>> >
>> > 2011/2/17 Massimo Di Pierro <[email protected]>
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > define "active"
>> >
>> > > look at scripts/sessions2trash.py which deletes expired sessions.
>> >
>> > > On Feb 17, 12:02 pm, Elcimar <[email protected]> wrote:
>> > > > Is there a way to get and access all active application's sessions?
>> > > > I'd like to make a simple chat app using sessions.
>>
>
>

Reply via email to