Randomly browsing stackoverflow ( I do that sometimes ), I found this question. I visited aribaweb’s page and I was very impressed with the Building a guestbook screencast.
When I have some free time, I’ll check it out.
Randomly browsing stackoverflow ( I do that sometimes ), I found this question. I visited aribaweb’s page and I was very impressed with the Building a guestbook screencast.
When I have some free time, I’ll check it out.
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.
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.
I recently discovered juno, a python web framework. It looks nice and simple. Give it a go !
I started to read some pylons tutorials. I didn’t expect to understand so much!
If you know some python, visit the pylons site to learn about this framework.
I think you’ll like it !