Master Massimo,

On Dec 30, 5:59 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> 1) GAE rules. Here is a quick fix.
>
> posts = db((db.posts.category == cat.id)).select(db.posts.ALL).sort
> (lambda r['created'],reverse=True)

Perfect !, this code solved this problem.

> 2) Try one of these variations
>
> if request.args[0] is u'Programação'
> if request.args[0] is unicode('Programação')
> if request.args[0] is unicode('Programação').encode('utf8')

This don't solved the problem !.

Well, I have another situation where the URL can be:
   www.leandro.inf.br/blog/category/Software Livre (because the name
of category is Software Livre

Then, I think that the best way of to map/generate the URLs is to do
this:
   www.leandro.inf.br/blog/category/?cat_name='Software Livre' or
   www.leandro.inf.br/blog/category/?cat_name='Programação' or
   www.leandro.inf.br/blog/category/?cat_name='Internet' or
   www.leandro.inf.br/blog/category/?cat_name='Vídeos'

   For tests in my Controller I changed the way of capture a variable
cat_name to

   Of
     cat_name = request.args[0]
   To
     cat_name = request.get_vars.cat_name

   But, I Still receive errors when I try access the posts by category
where I have special chars.

   The GAE Logs show-me this, when I try access this link /blog/
category/?cat_name=Vídeos:

   /blog/category/?cat_name=V%C3%ADdeos

File "/base/data/home/apps/leandro-inf/1.338823870352044294/
applications/init/controllers/default.py:category", line 74, in
category
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
1: ordinal not in range(128)

 Any idea ?

-- Leandro.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to