Guestbook Example
This example shows how to create a simple guestbook application using Twisted and Flex.
There is a live demo available on the PyAMF blog.
Download
Grab the example from the Subversion repository with:
svn co http://svn.pyamf.org/examples/trunk/guestbook guestbook-example
cd guestbook-example/python
Alternatively, if you just want to have a look, you can browse the source online.
Database
This example uses a MySQL setup with a database called 'guestbook'. The schema file is included that you need to run on your database first.
The database host/username/password settings can be found in the config file.
Server
The Twisted server for the Flash/AMF client starts on http://localhost:8080 when you start the guestbook.tac file from the python folder:
twistd -noy guestbook.tac
Note: Make sure you have Twisted >= 2.5 installed.
You should see something like:
2008-04-12 15:12:14+0200 [-] Log opened. 2008-04-12 15:12:14+0200 [-] twistd 8.0.1+r23300 (/usr/local/bin/python2.5 2.5.2) starting up 2008-04-12 15:12:14+0200 [-] reactor class: <class 'twisted.internet.selectreactor.SelectReactor'> 2008-04-12 15:12:14+0200 [-] twisted.web.server.Site starting on 8080 2008-04-12 15:12:14+0200 [-] Starting factory <twisted.web.server.Site instance at 0x12efb48>
Clients
Attachments
-
guestbook-example.jpg
(28.3 kB) - added by thijs
5 months ago.
screenshot of guestbook example
