Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

115 lines (73 sloc) 2.595 kb

Step 04: Skeleton Views

Enough "hello world", now we start working on Projector. The UX person usually has a series of screens they need to prototype, mapping to a URL structure.

We want to make that process fast and productive.

In this step we mock up the structure of the site map:


...and make a series of URLs that implement these. Along the way, we make more views and more templates.


  • Introduce UX workflow of "screens" using dummy data


  • "Default" and "named" views
  • More ZPT constructs


  1. $ cd ../../creatingux; mkdir step04; cd step04
  2. (Unchanged) Copy the following into step04/
  3. Copy the following into step04/
  4. Copy the following into step04/
  5. Copy the following into step04/
  6. Copy the following into step04/
  7. Copy the following into step04/
  8. Copy the following into step04/
  9. $ nosetests should report running 6 tests.
  10. $ python
  11. Open in your browser.

Extra Credit

  1. What happens if you have two view registrations with no @name attribute, meaning both as the default?
  2. Is Chameleon (now at version 2) any better at showing you error messages? Give it a try, put some errors into your Python expressions.
  3. Will the WebTest correctly trigger that error?
  4. Does ending your URLs in .html have any effect?


We are beginning the process of making a URL space that maps to objects and a hierarchy in our application. At the moment, we are simulating this with views.

Although our number of tests went up, each are still very small. Even such a simple test will still catch most of the silly errors that creep up during initial development. Hopefully you'll find that running nosetests is more productive than clickety-click.


  • How do the registrations happen under the hood?
  • Chameleon, caching, and writing compiled versions to disk
Jump to Line
Something went wrong with that request. Please try again.