Welcome to Nevow
This page contains examples of how to build web applications
on top of Nevow, in order of increasing complexity. To get a
feel of how to structure your Python code while using Nevow,
the source of all examples is linked for easy reference. In
order to run each example, you will need Zope Interface,
Twisted, and Nevow installed, and then you will need to run the
example server.
Under windows: you need to run the Twisted
Shell from Start-->Applications-->Twisted menu. Under a
unix like operating system, make sure that the twistd binary is
on your PATH. Installing Twisted will do this for you.
To run the example server, go to the Nevow examples
directory (eg: C:\Nevow\examples or /usr/src/Nevow/examples)
and run the following command:
twistd -noy examples.tac
Then, to view the running examples, point your web browser
at: http://localhost:8080/
Once you are viewing this page as served by the example
server, all of the "live" links below will work.
Table of Contents
- Test Suite
- Examples
- Tag Library Examples
- Demo Applications
Examples Listing
-
A Nevow example that doesn't use any of Nevow
automations
-
Hello world in Nevow
-
How to get Session and Request objects from the
context
-
Render tables in Nevow
-
How to use xmlfile directives
-
How to handles page children with Nevow, and how to
use the <nevow:attr> tag
-
Use Fragments to divide a page in logical
components
-
Use Macro directive to compose pages by transforming
the docFactory at precompile time
-
Allow data= directives to look inside application
objects
-
Use nested sequences to render an attribute of type
list of an object
-
Manual form example
-
Advanced manual form example
-
Formless example
-
Another formless example, but a little bit more
complex
-
[0.5]Using formless to create multi-step
wizards by returning Page instances from
autocallables
-
[0.5]Using formless, return a URL instance
from an autocallable to redirect to it
-
Example of interacting with a database
-
An example of using HTTP Basic Auth for simple
authentication
-
Various examples of how to integrate twisted.guard
with Nevow for authentication
-
Examples of how to access the session when a user
logs out of guarded sites
-
Use Configurables to render a form with Formless in a
customized template
-
Dynamically build your forms
-
Adapting an object to the IRenderer interface in
order to make it render itself
-
More complex example of adapting objects to IRenderer
and to different interfaces
-
Handling and building a Tree structure dynamically on
yor site
-
Simple example of text localisation
-
Localisation of disk templates
LivePage/Canvas/XUL
-
TypeAhead: Using asynchronous remote method invocation from
JavaScript to complete what the user is typing.
-
Calculator: A simple server-side calculator. All button presses and calculations
are processed at the server.
-
Widgets: An example of using Athena Widgets to define custom
methods for manipulating particular sections of a page's DOM, as
well as communicating in both directions between the client and
server.
Tag Library Examples
-
How to use the Calendar tag from the
taglibrary
-
How to use the Progressbar tag from the
taglibrary
Demo Applications
-
Extremely basic library, made with axiom (redesigned atop)
-
Handling users in a web site
-
Pastebin example with nevow
-
Blog engine
-
Link storage webservice (uses Twisted's
XML-RPC)
-
Todo list with rails like file structure (requires
pgasync 1.3b and postgres)
-
Image uploader that uses axiom