Welcome to Nevow

This page is here to order examples by complexity, the next step is to write extensive comments for each example, to add new examples that show each new corner of Nevow and to teach Nevow, feedback is greatly appreciated.

In order to run each example you need Twisted and Nevow installed

Under windows: you need to run the Twisted Shell from Start-->Applications-->Twisted menu

Go to the Nevow examples directory (eg: C:\Nevow\examples or /usr/src/Nevow/examples) and run each example with the following command

twistd -noy example-name.tac

Then, to see the application on your browser, just point it to: http://localhost:8080/

Example Listing

  1. Hello world in Nevow

    Stan Source: hellostan.tac xmlfile Source: hellohtml.tac xmlfile Template: hellohtml.html

  2. How to get Session and Request objects from the context

    Stan Source: simple.tac xmlfile Source: simplehtml.tac xmlfile Template: simplehtml.html
  3. Render tables in Nevow

    xmlfile Source: tablehtml.tac xmlfile Template: tablehtml.html

  4. How to use xmlfile directives

    Stan Source: disktemplates_stan.tac xmlfile Source: disktemplates.tac xmlfile Template: disktemplates.html
  5. How to handles page children with Nevow, and how to use the <nevow:attr> tag

    Stan Source: children.tac xmlfile Source: childrenhtml.tac
    xmlfile Templates: childrenhtml_RootPage.html / childrenhtml_ChildPage.html / childrenhtml_ChildOfChildPage.html

  6. Formless example

    Stan Source: formpost.tac
  7. Another formless example, but a little bit more complex

    Stan Source: formpost2.tac
  8. Example of interacting with a database

    Stan Source: db.tac
  9. Various examples of how to integrate twisted.guard with Nevow for authentication

    Stan Source: guarded.tac Stan Source: guarded2.tac Stan Source: guarded3.tac
  10. Use Configurables to render a form with Formless in a customized template

    xmlfile Source: customform.tac
  11. Dynamically build your forms

    Stan Source: formbuilder.tac
  12. Adapting an object to the IRenderer interface in order to make it render itself

    Stan Source: simple_irenderer.tac
  13. More complex example of adapting objects to IRenderer and to different interfaces

    Stan Source: irenderer.tac
  14. Handling and building a Tree structure dynamically on yor site

    Stan Source: tree.tac
  15. Complete application: handling users in a web site

    Stan Source: userdb.tac
  16. Complete application: Liveevil example in a live chat page

    Source: chatola
  17. Complete application: Pastebin example with nevow

    Source: pastebin

Tips and Tricks

TODO: Lot of stuff