Dislikes character "\" editing html/controllers from admin page

2 views
Skip to first unread message

Alex Fanjul

unread,
Jul 22, 2009, 2:31:33 PM7/22/09
to web...@googlegroups.com
Hello,
when I tray to view or edit an html code clicking in the name (ie:
default/index.html [edit | htmledit | delete]) from the admin page, the
system complains saying "Not Found URL" because the URL has "\"
character at the end
(http://localhost/admin/default/peek/welcome/views/default\index.html),
if I turn to "/" it works.
My enviroment: Windows + Apache + mod_wsgi + web2py 1.65.5

Withn cherrypy (web2py standalone) it works right.

Maybe the mod wsgi handler? any suggestion? thanks
alex f


--
Alejandro Fanjul Fdez.
alex....@gmail.com
www.mhproject.org

Alex Fanjul

unread,
Jul 22, 2009, 2:41:56 PM7/22/09
to web...@googlegroups.com
Maybe something with this?
def peekfile(path,file):
return
A(file.replace('\\\\','/'),_href=URL(r=request,f='peek/%s/%s/%s' % (app,
path, file)))

Alex Fanjul

unread,
Jul 22, 2009, 3:07:51 PM7/22/09
to web...@googlegroups.com
This works for me:

def peekfile(path,file):
return
A(file.replace('\\','/'),_href=URL(r=request,f='peek/%s/%s/%s' % (app,

path, file.replace('\\','/'))))

in [line 5] \web2py\applications\admin\views\default\design.html

Acoording to byteofpython book, you have to use an escape sequence
forusing a" double quote itself" in a "double quoted string" (not with
single quote strings), but maybe your code is a matter of linux paths,
or something...

Do I really corrected my first bug in open source community?? :-O ,
likely not. :-D, but it works for me...
alex F

Reply all
Reply to author
Forward
0 new messages