summaryrefslogtreecommitdiff
path: root/docs/develop-example.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/develop-example.txt')
-rw-r--r--docs/develop-example.txt72
1 files changed, 72 insertions, 0 deletions
diff --git a/docs/develop-example.txt b/docs/develop-example.txt
new file mode 100644
index 0000000..efc871b
--- /dev/null
+++ b/docs/develop-example.txt
@@ -0,0 +1,72 @@
+Development With Paste: An Example
+++++++++++++++++++++++++++++++++++
+
+This example uses `WebKit </webkit/>`_, `SQLObject
+<http://sqlobject.org>`_, and `Zope Page Templates <>`_, but it's all
+pluggable for other frameworks and tools.
+
+Paste enabled applications are all proper Python packages, and even
+moreso they are installable by `easy_install <>`_, including Paste
+itself::
+
+ $ easy_install PasteScript PasteWebKit SQLObject ZPTKit
+ ... messages fly by ...
+
+This example also uses Subversion repository (we'll assume you've set
+up a repository with ``svnadmin create /home/me/testrepos``). When
+you create a project, you can create a layout in your repository for
+it.
+
+This will create the new project::
+
+ $ paster create --template=webkit --template=zpt \
+ --svn-repository=file:///home/me/testrepos Wiki
+ ... the package is setup in the repository ...
+ ... file listings fly by ...
+ $ cd Wiki
+ $ svn commit -m "New project"
+ ... messages about committing ...
+
+The basic setup has a simplest of applications already set up; you can
+test everything is working by running::
+
+ $ paster serve --reload docs/devel_config.ini
+ ... now your new app is served on http://localhost:8080/ ...
+ ... ^C to quit
+
+It also has set up a `py.test <>`_ fixture for you, so you can run the
+first test (which just tests that the front page loads up properly):
+
+ $ py.test -v
+ ... test results ...
+
+Using the ``webkit`` template we've also added a new command for
+setting up new servlets::
+
+ $ paster servlet listing
+ ... @@: creating files ...
+
+Also, all the metadata for SQLObject has been added to the template,
+and can be used like::
+
+ $ sqlobject-admin create --egg=Wiki
+ ... database create statements ...
+
+You can add version information to your model as well, so that you can
+develop and record your updates, and then apply them to old versions
+of the database.
+
+Once you've made something you are ready to deploy, you can use
+`buildutils <>`_ to tag it for release::
+
+ $ python setup.py svntag --version=0.1 -b ../Wiki01
+ $ cd ../Wiki01
+ $ python setup.py sdist
+ ... boring messages ...
+ ... @@: Deploy stuff ...
+
+And then deploy it on another server::
+
+ $ ssh other-server
+ ... @@: More deploy stuff ...
+