Archive for the 'juno' Category

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.

16
May
09

first byte of juno


I mentioned in an earlier post about juno, and since I had some free time on my hands, I decided to give it a try.

I didn’t have jinja2 and pysqlite2 installed, but I took care of that pretty fast.

After playing with a hello world example, I wanted to try out templates. I read the jinja2 documentation and I was ready to go … until a TemplateNotFound exception kicked in.

My first reaction was to check and see if the names matched, both in the source file, and in the filesystem. They did … so I thought about creating a folder named templates and moving the template there. After doing that, the exception didn’t occur anymore, and the code worked.

13
May
09

juno framework


I recently discovered juno, a python web framework. It looks nice and simple. Give it a go !




Blog Stats

  • 281,739 hits