Incude static files during debuging in Python paste

Incude static files during debuging in Python paste

Postby apollo1984 » Tue Sep 03, 2013 8:08 am

Hello!

I use python paste internal web-server to debug web-aplication. I have some troubles to include static files (javascript, images, CSS-tables) to HTML-template.
Tell me please, how can i include external file to HTML-file template

Now i make such HTML-response to client:


<HTML><HEAD><link rel=“SHORTCUT ICON” href=“c:\\web\\favicon.ico”>
<META HTTP-EQUIV=“Content-Type” CONTENT=“text/html; CHARSET=utf-8”>
<STYLE>
…………………………
</STYLE>
<SCRIPT type=“text/javascript”>
function validate() {
…………………………
}
</SCRIPT>
……………………..
</HTML>

It is not convenient, and not always possible to include large static files into the HTML body

I guess, i can solve the problem using such paste API

paste.urlparser.StaticURLParser,
paste.urlparser.make_static (http://pythonpaste.org/modules/urlparser.html)

But i can not find good working examples to use it.

Thanks a lot!
apollo1984
 
Posts: 1
Joined: Tue Sep 03, 2013 7:55 am

Return to Web Development

Who is online

Users browsing this forum: Google [Bot] and 3 guests