Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (19 sloc) 1.46 KB
layout title


Other languages : español | russian русский | japan 日本語 | chinese 简体中文 | français | Česko

Example code for many common questions can be found in the cookbook section.

  1. Why are the urls just one long list?

    If they were a dictionary, they wouldn't be ordered. If it was a list of tuples, then it'd be a lot more typing.

  2. How do I serve static files such as JavaScripts or images like PNG and JPG with the server?

    Create a directory (also known as a folder) called static in the location of the script that runs the server. Then place the static files you wish to server in the static folder. For example, the URL http://localhost/static/logo.png will send the image ./static/logo.png to the client.

  3. Where can I go for additional help?

    Google Groups has a group that is quite helpful.

  4. How do I debug print to the console?

    web.debug("I will get printed to the console and not the body of the webpage")

  5. I stumbled over a bug in Where can I file it?

    Go to the webpy launchpad site, login (or register if you have to) and click on "report a bug".

  6. What's this magic ctx I see in examples?

    ctx cookbook recipe