werkzeug-main / examples /

Filename Size Date modified Message
..
contrib
coolmagic
cupoftee
i18nurls
partial
plnt
shorty
simplewiki
webpylike
2.8 KB
463 B
329 B
440 B
1.9 KB
441 B
1.1 KB
759 B
1.2 KB
=================
Werkzeug Examples
=================

This directory contains various example applications and example code of
Werkzeug powered applications.  Nearly all of them are written for Python 2.4
and higher so don't expect them to work on Python 2.3.

Beside the proof of concept applications and code snippets in the partial
folder they all have external depencencies for template engines or database
adapters (SQLAlchemy only so far).


Full Example Applications
=========================

The following example applications are application types you would actually
find in real life :-)


`simplewiki`
    A simple Wiki implementation.

    Requirements:
    -   SQLAlchemy
    -   Creoleparser >= 0.3.3
    -   genshi

    You can obtain all packages in the Cheeseshop via easy_install.  You have
    to have at least version 0.3.3 of Creoleparser.

    Usage::

        ./manage-simplewiki.py initdb
        ./manage-simplewiki.py runserver

    Or of course you can just use the application object
    (`simplewiki.SimpleWiki`) and hook that into your favourite WSGI gateway.
    The constructor of the application object takes a single argument which is
    the SQLAlchemy URI for the database.

    The management script for the devserver looks up the an environment var
    called `SIMPLEWIKI_DATABASE_URI` and uses that for the database URI.  If
    no such variable is provided "sqlite:////tmp/simplewiki.db" is assumed.

`plnt`
    A planet called plnt, pronounce plant.

    Requirements:
    -   SQLAlchemy
    -   Jinja
    -   feedparser

    You can obtain all packages in the Cheeseshop via easy_install.

    Usage::

        ./manage-plnt.py initdb
        ./manage-plnt.py sync
        ./manage-plnt.py runserver

    The WSGI application is called `plnt.Plnt` which, like the simple wiki,
    accepts a database URI as first argument.  The environment variable for
    the database key is called `PLNT_DATABASE_URI` and the default is
    "sqlite:////tmp/plnt.db".

    Per default a few python related blogs are added to the database, you
    can add more in a python shell by playing with the `Blog` model.

`shorty`
    A tinyurl clone for the Werkzeug 0.2 tutorial.

    Requirements:
    -   SQLAlchemy
    -   Jinja

    You can obtain all packages in the Cheeseshop via easy_install.

    Usage::

        ./manage-plnt.py initdb
        ./manage-plnt.py runserver

    The WSGI application is called `shorty.application.Shorty` which, like the
    simple wiki, accepts a database URI as first argument.

    The source code of the application is explained in detail in the Werkzeug
    tutorial.

`cupoftee`
    A `teewars <http://www.teewars.com/>`_ server browser.  This application
    works best in a non forking environment and won't work for CGI.

    Usage::

        ./manage-cupoftee.py runserver
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.