Hello,

I'm playing with the web2py-book app, in order to make it python 3
compatible and also to improve it a bit. I have a couple of questions
related to default.py:

1. there were some encode-decode errors. I was able to resolve them (see
https://github.com/nicozanf/web2py-book for a preview) but I was forced to
use many "IF PY2 / else" conditions, in order to preserve python 2.7
compatibility.  Is there a more elegant and pythonic solution to manage
this and similar situations?

2. I've added a try/except condition, in order to catch a missing library
(pygments). It works fine, but the session.flash error message is not
displayed at all because it's followed by a  redirect to index itself and
there is a session.forget() on the top that cleans it. If I comment the
session.forget() the flash message is correctly displayed. What can I do?

Cheers,
Nico

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to