From 7752a3102fc8aa68ee7e349495bc2e9345c77c00 Mon Sep 17 00:00:00 2001 From: ianb Date: Fri, 22 Apr 2005 03:11:58 +0000 Subject: Internal renaming of wsgikit->paste --- examples/login_example.py | 4 +- examples/todo/QUICKSTART | 20 ++-- examples/todo/SitePage.py | 10 +- examples/todo/__init__.py | 4 +- examples/todo/favicon.ico | 191 -------------------------------------- examples/todo/lists.py | 2 +- examples/todo_sql/__init__.py | 2 +- examples/todo_sql/web/__init__.py | 6 +- 8 files changed, 23 insertions(+), 216 deletions(-) delete mode 100644 examples/todo/favicon.ico (limited to 'examples') 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("""

WSGIKit ToDo + self.write("""

Paste ToDo List


""" % 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 @@ - - - - - - Webware for Python - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Webware for Python - -Webware - - - -

-Download -Webware 0.8.1 -

- - -
-Webware -
- - - - - - - - - - - - - - - -

Webware for Python -

- -
-

Webware for Python 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.

-
-
-

News

-
-

2005-03-18 - ZPTKit 0.1

-

ZPTKit version 0.1 released. ZPTKit helps make Zope Page Templates -easy to use with Webware. For more on ZPTKit see -http://imagescape.com/software/ZPTKit/, download or view the -source.

-
-
-

2005-03-16 - Component 0.1

-

Component version 0.1 released. Component provides a subclass of -WebKit.Page that makes it easier to reuse code from multiple -sources that extend the capability of servlets.

-
-
-

2005-03-14 - Webware switches to Subversion

-

Webware has switched its source-code repository from using Sourceforge's -CVS service to using a Subversion hosted on the webwareforpython.org -(aka w4py.org) server. Here are some instructions on how to access the repository. -Newcomers to subversion may be interested in the Subversion book.

-
-
-

2004-11-17 - WSGI Webware renamed to WSGIKit

-

You can now find the WSGI-enabled Webware implementation at -svn://colorstudy.com/trunk/WSGIKit or view online. -It is now distutil-installable and includes documentation.

-
-
-

2004-10-05 - Webware WSGIKit

-

An effort is in the works to port Webware to the new -Web Server Gateway Interface (WSGI). The WSGI is an effort by -the Python Web-SIG 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 http://svn.w4py.org/WSGIKit/trunk and viewed online.

-
-
-

2004-06-19 - Website re-organization in progress

-

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 old site, -re-organizing, and updating it where necessary. Please bear with us.

-
-
-

2004-04-05 - New server and domain

-

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!

-
-
-

2003-08-01 - Webware 0.8.1 Released

-

Webware 0.8.1 was released today. It contains an important security fix, -and all users should upgrade. See the 0.8.1 release notes for details.

-
-
-

2003-02-09 - Webware 0.8.0 Released

-
    -
  • All adapters have been moved to Webware/WebKit/Adapters
  • -
  • LRWPAdapter added, for use with the Xitami web server
  • -
  • setCookie method in HTTPResponse. New method supports -setting the expire time, path (which defaults to "/") and security flag. -The expire time can be set with constants "ONCLOSE", "NOW", or "NEVER"; or -you can give an integer timestamp, tuple of integers (as used in the time -module), or string identifier (like "+1w" for 1 week in the future).
  • -
  • Added an experimental HTTPAdapter.py which serves directly as an -HTTP server.
  • -
  • Added an optional AutoReload setting to enable reloading the server -whenever source files, including servlets and PSP files are changed.
  • -
  • Fix so PSP works with python 2.3a1.
  • -
  • Includes an Apache 2 mod_webkit adapter, and pre-compiled DLL for windows.
  • -
  • Fixed a problem where escapes in PSP source were not being processed correctly.
  • -
  • Restored 0.7 behavior of Page.writeDocType() to output 4.01 Transitional. -See the 0.8 release notes for more info.
  • -
  • Upgraded documentation
  • -
  • Improvements to profilling.
  • -
  • Numerous bug fixes.
  • -
-
-
-
-

This page can be updated in the Webware Wiki.

- -
-

- -python powered -

- -

-Hosted by tummy.com -

- -
- - - 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) -- cgit v1.2.1