summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-04-22 03:11:58 +0000
committerianb <devnull@localhost>2005-04-22 03:11:58 +0000
commit7752a3102fc8aa68ee7e349495bc2e9345c77c00 (patch)
tree7896dd31404fdfbba44d9c0338a7c1ae8e4ad5f8 /examples
parent4431828c677e6104b7abc62b31a933d2793ff6cf (diff)
downloadpaste-7752a3102fc8aa68ee7e349495bc2e9345c77c00.tar.gz
Internal renaming of wsgikit->paste
Diffstat (limited to 'examples')
-rw-r--r--examples/login_example.py4
-rw-r--r--examples/todo/QUICKSTART20
-rw-r--r--examples/todo/SitePage.py10
-rw-r--r--examples/todo/__init__.py4
-rw-r--r--examples/todo/favicon.ico191
-rw-r--r--examples/todo/lists.py2
-rw-r--r--examples/todo_sql/__init__.py2
-rw-r--r--examples/todo_sql/web/__init__.py6
8 files changed, 23 insertions, 216 deletions
diff --git a/examples/login_example.py b/examples/login_example.py
index ee6e55b..d4b7ea3 100644
--- a/examples/login_example.py
+++ b/examples/login_example.py
@@ -1,5 +1,5 @@
-from wsgikit.twisted_wsgi import serve_application
-from wsgikit import echo, login
+from paste.twisted_wsgi import serve_application
+from paste import echo, login
def twisted_serve(app):
serve_application(
diff --git a/examples/todo/QUICKSTART b/examples/todo/QUICKSTART
index 1de319e..ec36082 100644
--- a/examples/todo/QUICKSTART
+++ b/examples/todo/QUICKSTART
@@ -1,33 +1,33 @@
-WSGIKit Example Application: todo
+Paste Example Application: todo
=================================
This is a simple application intended to demonstrate the basic usage of
-a WSGIKit site as well as some WSGI features such as a middleware hooks
+a Paste site as well as some WSGI features such as a middleware hooks
that performs URL rewriting.
ROADMAP lists some of the features we intend to implement in the future.
-Installing WSGIKit
+Installing Paste
------------------
-`docs/WSGIKit.txt`__ describes a basic user-level installation of
-WSGIKit and supported WSGI servers.
+`docs/Paste.txt`__ describes a basic user-level installation of
+Paste and supported WSGI servers.
-.. __: http://svn.w4py.org/WSGIKit/trunk/docs/WSGIKit.txt
+.. __: http://svn.w4py.org/Paste/trunk/docs/Paste.txt
Your First Run
--------------
The commands::
- cd WSGIKit/trunk
- wsgikit/server.py --server=wsgiutils --webkit-dir=example/todo \
+ cd Paste/trunk
+ scripts/wsgi-server --server=wsgiutils --webkit-dir=example/todo \
--port 8080 -D --data-dir='/var/www/data1'
-If you do not have $PYTHONPATH set up as described WSGIKit.txt then you
+If you do not have $PYTHONPATH set up as described Paste.txt then you
can add a like such as this::
- env PYTHONPATH=`pwd` wsgikit/server.py ...
+ env PYTHONPATH=`pwd` paste/server.py ...
Replace 'env' with 'setenv' if you're using csh or tcsh.
diff --git a/examples/todo/SitePage.py b/examples/todo/SitePage.py
index 178e471..5d7ceed 100644
--- a/examples/todo/SitePage.py
+++ b/examples/todo/SitePage.py
@@ -1,9 +1,7 @@
-
import os
-from wsgikit.webkit.wkservlet import Page
+from paste.webkit.wkservlet import Page
import api
-
class SitePage(Page):
manager = None
@@ -11,7 +9,7 @@ class SitePage(Page):
def awake(self, trans):
super(SitePage, self).awake(trans)
if not getattr(self, 'manager', None):
- datadir = trans.request().environ().get('wsgikit.config',{}).get('datadir','.')
+ datadir = trans.request().environ().get('paste.config',{}).get('datadir','.')
self.manager = api.Manager.load(root=datadir)
self.baseURL = trans.request().environ()['todo.base_url']
self.username = self.session().value('username', None)
@@ -44,7 +42,7 @@ class SitePage(Page):
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n""")
def title(self):
- return "WSGIKit ToDo list test"
+ return "Paste ToDo list test"
def htBodyArgs(self):
return ""
@@ -55,7 +53,7 @@ class SitePage(Page):
self.writePostContent()
def writePreContent(self):
- self.write("""<h1><img src="%s/check.png" align="absmiddle" />WSGIKit ToDo
+ self.write("""<h1><img src="%s/check.png" align="absmiddle" />Paste ToDo
List</h1><hr />""" % self.baseURL)
def writeContent(self):
diff --git a/examples/todo/__init__.py b/examples/todo/__init__.py
index fbf9c0a..1065277 100644
--- a/examples/todo/__init__.py
+++ b/examples/todo/__init__.py
@@ -1,5 +1,5 @@
import os
-from wsgikit import wsgilib
+from paste import wsgilib
def urlparser_hook(environ):
if not environ.has_key('todo.base_url'):
@@ -7,7 +7,7 @@ def urlparser_hook(environ):
def not_found_hook(environ, start_response):
- p = environ['wsgikit.urlparser.not_found_parser']
+ p = environ['paste.urlparser.not_found_parser']
username, rest = wsgilib.path_info_split(environ.get('PATH_INFO', ''))
if username is None:
return p.not_found(environ, start_response)
diff --git a/examples/todo/favicon.ico b/examples/todo/favicon.ico
deleted file mode 100644
index 3d97672..0000000
--- a/examples/todo/favicon.ico
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html>
-<head>
- <title>Webware for Python
-</title>
-<link href="css/main.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-
-<table cellspacing="0" cellpadding="0" style="width: 100%; border-spacing: 0px;">
-<tr>
-
-<td style="width: 158px; height: 80px;">
-<a href="/"><img src="graphics/python_top.png" width="158" height="80" alt="Webware for Python" /></a>
-</td>
-
-<td style="width: 243px; height: 80px;">
-<a href="/"><img src="graphics/webware.png" width="243" height="80" alt="Webware" /></a>
-</td>
-
-<td style="width: 100%; height: 80px; text-align: center; background-image: url('graphics/head_middle.png');">
-
-
-<p class="topbar">
-Download
-<a href="http://prdownloads.sourceforge.net/webware/Webware-0.8.1.tar.gz?download"><b>Webware 0.8.1</b></a>
-</p>
-
-
-</td>
-
-<td style="height: 80px; text-align: right; width: 6px;">
-<img src="graphics/head_right.png" width="6" height="80" alt="Webware" />
-</td>
-</tr>
-
-<tr>
-<td style="vertical-align: top; width: 158px; height: 400px; background-image: url('graphics/menu.png'); background-repeat: no-repeat;">
-
-
-<p style="padding-top: 41px; margin-top: 0px;" class="menu">
-<strong>Documentation</strong><br />
-<a class="menu" href="Webware/Docs/Overview.html">Overview</a><br />
-<a class="menu" href="Webware/Docs/index.html">Online Docs</a><br />
-<!--<a class="menu" href="#">Development</a><br />-->
-<a class="menu" href="http://wiki.w4py.org/">Wiki</a><br />
-<a class="menu" href="Papers/">Papers</a><br />
-</p>
-
-<p class="menu">
-<strong>Download</strong><br />
-<a class="menu" href="http://prdownloads.sourceforge.net/webware/Webware-0.8.1.tar.gz?download">Webware-0.8.1</a><br />
-<a class="menu" href="OlderVersions">Older versions</a><br />
-</p>
-
-<p class="menu">
-<strong>Mailing lists</strong><br />
-<a class="menu" href="http://lists.sourceforge.net/mailman/listinfo/webware-announce">webware-announce</a><br />
-<a class="menu" href="http://lists.sourceforge.net/mailman/listinfo/webware-discuss">webware-discuss</a><br />
-<a class="menu" href="http://lists.sourceforge.net/mailman/listinfo/webware-devel">webware-devel</a><br />
-</p>
-
-<p class="menu">
-<strong>Development</strong><br />
-<a class="menu" href="Wiki/subversionrepositoryaccess">Source Code</a><br />
-<a class="menu" href="http://www.sourceforge.net/projects/webware">Sourceforge Page</a><br />
-<a class="menu" href="http://sourceforge.net/tracker/?group_id=4866&atid=104866">Bug tracker</a><br />
-</p>
-
-<p class="menu">
-<strong>Support</strong><br />
-<a class="menu" href="Consultants">Consultants</a></p>
-
-
-</td>
-
-<td rowspan="2" colspan="3" id="content" style="vertical-align: top; width: 100%%; height: 100%%;">
-
-<h1>Webware for Python
-</h1>
-
-<div class="document">
-<p><strong>Webware for Python</strong> is a suite of software components for developing object-oriented, web-based applications. The suite uses well known design patterns and includes popular features such as a fast application server, Python Server Pages (PSP), and a CGI wrapper.</p>
-<hr />
-<div class="section" id="news">
-<h1><a name="news">News</a></h1>
-<div class="section" id="zptkit-0-1">
-<h2><a name="zptkit-0-1">2005-03-18 - ZPTKit 0.1</a></h2>
-<p>ZPTKit version 0.1 released. ZPTKit helps make <a class="reference" href="http://www.zope.org/DevHome/Wikis/DevSite/Projects/ZPT/FrontPage">Zope Page Templates</a>
-easy to use with Webware. For more on ZPTKit see
-<a class="reference" href="http://imagescape.com/software/ZPTKit/">http://imagescape.com/software/ZPTKit/</a>, <a class="reference" href="http://imagescape.com/software/ZPTKit/ZPTKit-0.1.tar.gz">download</a> or <a class="reference" href="http://svn.webwareforpython.org/ZPTKit/trunk">view the
-source</a>.</p>
-</div>
-<div class="section" id="component-0-1">
-<h2><a name="component-0-1">2005-03-16 - Component 0.1</a></h2>
-<p><a class="reference" href="http://wiki.webwareforpython.org/component.html">Component</a> version 0.1 released. Component provides a subclass of
-<tt class="literal"><span class="pre">WebKit.Page</span></tt> that makes it easier to reuse code from multiple
-sources that extend the capability of servlets.</p>
-</div>
-<div class="section" id="webware-switches-to-subversion">
-<h2><a name="webware-switches-to-subversion">2005-03-14 - Webware switches to Subversion</a></h2>
-<p>Webware has switched its source-code repository from using Sourceforge's
-CVS service to using a <a class="reference" href="http://subversion.tigris.org/">Subversion</a> hosted on the webwareforpython.org
-(aka w4py.org) server. Here are some <a class="reference" href="Wiki/subversionrepositoryaccess">instructions on how to access the repository</a>.
-Newcomers to subversion may be interested in <a class="reference" href="http://svnbook.red-bean.com/en/1.0/index.html">the Subversion book</a>.</p>
-</div>
-<div class="section" id="wsgi-webware-renamed-to-wsgikit">
-<h2><a name="wsgi-webware-renamed-to-wsgikit">2004-11-17 - WSGI Webware renamed to WSGIKit</a></h2>
-<p>You can now find the WSGI-enabled Webware implementation at
-<tt class="literal"><span class="pre">svn://colorstudy.com/trunk/WSGIKit</span></tt> or <a class="reference" href="http://svn.colorstudy.com/trunk/WSGIKit">view online</a>.
-It is now distutil-installable and includes documentation.</p>
-</div>
-<div class="section" id="webware-wsgikit">
-<h2><a name="webware-wsgikit">2004-10-05 - Webware WSGIKit</a></h2>
-<p>An effort is in the works to port Webware to the new
-<a class="reference" href="http://www.python.org/peps/pep-0333.html">Web Server Gateway Interface (WSGI)</a>. The WSGI is an effort by
-<a class="reference" href="http://www.python.org/sigs/web-sig/">the Python Web-SIG</a> to create a standard
-interface for Python web applications, frameworks, and servers, and
-should allow Webware to be run in different environments, and alongside
-other Python web frameworks. Work can be found in a Subversion repository
-at <tt class="literal"><span class="pre">http://svn.w4py.org/WSGIKit/trunk</span></tt> and <a class="reference" href="http://svn.w4py.org/WSGIKit/trunk">viewed online</a>.</p>
-</div>
-<div class="section" id="website-re-organization-in-progress">
-<h2><a name="website-re-organization-in-progress">2004-06-19 - Website re-organization in progress</a></h2>
-<p>Thanks to Eric Radman for the new site design, and Jacob Hanson for the logo.
-We're in the process of moving content over from the <a class="reference" href="http://webware.sf.net/oldsite">old site</a>,
-re-organizing, and updating it where necessary. Please bear with us.</p>
-</div>
-<div class="section" id="new-server-and-domain">
-<h2><a name="new-server-and-domain">2004-04-05 - New server and domain</a></h2>
-<p>The Webware project has been generously provided with a virtual server and
-hosting package, and has registered webwareforpython.org. We will be moving the
-Wiki to this server and are in the process of redesigning the entire website in
-order to provide more useful and better-organized information -- stay tuned!</p>
-</div>
-<div class="section" id="webware-0-8-1-released">
-<h2><a name="webware-0-8-1-released">2003-08-01 - Webware 0.8.1 Released</a></h2>
-<p>Webware 0.8.1 was released today. It contains an important security fix,
-and all users should upgrade. See the <a class="reference" href="http://www.webwareforpython.org/Webware-0.8.1/Docs/RelNotes-0.8.1.html">0.8.1 release notes</a> for details.</p>
-</div>
-<div class="section" id="webware-0-8-0-released">
-<h2><a name="webware-0-8-0-released">2003-02-09 - Webware 0.8.0 Released</a></h2>
-<ul class="simple">
-<li>All adapters have been moved to Webware/WebKit/Adapters</li>
-<li>LRWPAdapter added, for use with the <a class="reference" href="http://xitami.com">Xitami web server</a></li>
-<li><tt class="literal"><span class="pre">setCookie</span></tt> method in <tt class="literal"><span class="pre">HTTPResponse</span></tt>. New method supports
-setting the expire time, path (which defaults to &quot;/&quot;) and security flag.
-The expire time can be set with constants &quot;ONCLOSE&quot;, &quot;NOW&quot;, or &quot;NEVER&quot;; or
-you can give an integer timestamp, tuple of integers (as used in the time
-module), or string identifier (like &quot;+1w&quot; for 1 week in the future).</li>
-<li>Added an <em>experimental</em> <tt class="literal"><span class="pre">HTTPAdapter.py</span></tt> which serves directly as an
-HTTP server.</li>
-<li>Added an optional AutoReload setting to enable reloading the server
-whenever source files, including servlets and PSP files are changed.</li>
-<li>Fix so PSP works with python 2.3a1.</li>
-<li>Includes an Apache 2 mod_webkit adapter, and pre-compiled DLL for windows.</li>
-<li>Fixed a problem where escapes in PSP source were not being processed correctly.</li>
-<li>Restored 0.7 behavior of Page.writeDocType() to output 4.01 Transitional.
-See the <a class="reference" href="http://webware.sourceforge.net/WebKit/Docs/RelNotes-0.8.html">0.8 release notes</a> for more info.</li>
-<li>Upgraded documentation</li>
-<li>Improvements to profilling.</li>
-<li>Numerous bug fixes.</li>
-</ul>
-</div>
-</div>
-</div>
-<hr /><p>This page <a href="http://wiki.w4py.org/webwarenews.html?_action_=edit">can be updated</a> in the <a href="http://wiki.w4py.org">Webware Wiki.</a></p>
-
-</td>
-</tr>
-
-<tr>
-<td style="vertical-align: bottom;">
-<p style="text-align: center;">
-<a href="http://www.python.org/">
-<img src="graphics/PythonPowered.png" width="88" height="31" alt="python powered" /></a>
-</p>
-
-<p style="text-align: center;">
-Hosted by <a href="http://www.tummy.com/">tummy.com</a>
-</p>
-
-</td></tr>
-
-</table>
-
-</body>
-</html>
diff --git a/examples/todo/lists.py b/examples/todo/lists.py
index 581e7db..558e018 100644
--- a/examples/todo/lists.py
+++ b/examples/todo/lists.py
@@ -1,6 +1,6 @@
from urllib import pathname2url
from urllib2 import unquote
-from wsgikit.httpexceptions import HTTPNotFound
+from paste.httpexceptions import HTTPNotFound
from SitePage import SitePage
diff --git a/examples/todo_sql/__init__.py b/examples/todo_sql/__init__.py
index 39d0c09..3415d9d 100644
--- a/examples/todo_sql/__init__.py
+++ b/examples/todo_sql/__init__.py
@@ -1,4 +1,4 @@
-from wsgikit.util.thirdparty import add_package
+from paste.util.thirdparty import add_package
add_package('ZopePageTemplates')
add_package('Component')
diff --git a/examples/todo_sql/web/__init__.py b/examples/todo_sql/web/__init__.py
index 835887d..ed4edc7 100644
--- a/examples/todo_sql/web/__init__.py
+++ b/examples/todo_sql/web/__init__.py
@@ -1,6 +1,6 @@
import os
-from wsgikit import wsgilib
-from wsgikit.util.thirdparty import add_package
+from paste import wsgilib
+from paste.util.thirdparty import add_package
add_package('sqlobject')
import sqlobject
@@ -12,6 +12,6 @@ def urlparser_hook(environ):
environ['todo_sql.base_url'] = environ['SCRIPT_NAME']
if not sql_set:
sql_set = True
- db_uri = environ['wsgikit.config']['database']
+ db_uri = environ['paste.config']['database']
sqlobject.sqlhub.processConnection = sqlobject.connectionForURI(
db_uri)