20
May
09

juno session activation snippet


I found some spare time this night, and I decided to read some more on juno. I think I got the hang of templates, and I decided to try and give sessions a try.

Initially, I was kind of confused that I kept receiving a NoneType exception when trying to access the web.session object, but then I realized that I needed to change it’s configuration hash. The key you need to modify is use_sessions, and set it’s value to True.

If you imported juno like this:

from juno import *

then you need to call config like this :

config({"use_sessions":True})

If you imported juno like this:

import juno

then you need to call config like this :

juno.config({"use_sessions":True})

This is not something advanced, just basic python. After calling config web.session won’t be None anymore.

Advertisements

0 Responses to “juno session activation snippet”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 229,426 hits

%d bloggers like this: