Cherrypy-Mako-jQuery << Help!

75 views
Skip to first unread message

Paul Tito

unread,
May 25, 2012, 12:39:54 AM5/25/12
to cherryp...@googlegroups.com
Hi! I'm rather new in Cherrypy & Mako but I would like to ask help regarding
my simple application.

1. *This is my cherrypy test file in python:*
http://python.6.n6.nabble.com/file/n4975757/17.jpg

2. *This is my html template for mako*
http://python.6.n6.nabble.com/file/n4975757/30.jpg

3. *This is when you load the html file on its own*
http://python.6.n6.nabble.com/file/n4975757/54.jpg

4. *This is when you run the python using localhost*
http://python.6.n6.nabble.com/file/n4975757/23.jpg

5. *This is the result*
http://python.6.n6.nabble.com/file/n4975757/29.jpg

When I click the link in #4, the result should be like in #3. How should I
do this?


--
View this message in context: http://python.6.n6.nabble.com/Cherrypy-Mako-jQuery-Help-tp4975757.html
Sent from the cherrypy-users mailing list archive at Nabble.com.

Joel Rivera

unread,
May 27, 2012, 2:06:19 PM5/27/12
to cherryp...@googlegroups.com, pll....@gmail.com
The only reason that I can find is that the static file actually does
not exists, the problem should be in the `os.path.join` call, because
of the trailing slash in the las argument, the function call in yielding

/jquery-1.7.2.min.js

because:

os.path.join('a', 'b', 'c') -> a/b/c

and

os.path.join('a', 'b', '/c') -> /c


"join(a, *p)
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded."
--
Rivera²

Reply all
Reply to author
Forward
0 new messages