The Bespin project is building a web-based code editor using the emerging HTML5 standard. The editor is easily extensible with JavaScript and can be used in your own applications. (the mozilla/ mirror is READ ONLY, synchronized from mercurial)
Перейти к файлу
Patrick Walton 4819b48800 Never raise errors if dependencies can't be found in a batch of metadata, since this prevents user plugins from depending on built-in plugins 2010-06-30 14:04:24 -07:00
bespin Never raise errors if dependencies can't be found in a batch of metadata, since this prevents user plugins from depending on built-in plugins 2010-06-30 14:04:24 -07:00
ext initial commit of bespin python server that is separate from the bespin 2009-09-23 09:57:21 -04:00
production initial commit of bespin python server that is separate from the bespin 2009-09-23 09:57:21 -04:00
.hgignore add devfiles to the hgignore 2010-03-31 13:29:50 -04:00
.hgtags Added tag 0.8 for changeset 96bca5879540 2010-06-22 09:27:56 -04:00
MANIFEST.in initial commit of bespin python server that is separate from the bespin 2009-09-23 09:57:21 -04:00
README.txt initial commit of bespin python server that is separate from the bespin 2009-09-23 09:57:21 -04:00
pavement.py fix bug 552670: python build was not correctly setting up package list 2010-04-06 10:15:11 -04:00
requirements.txt exclude SQLAlchemy 0.6, which requires some code upgrades 2010-03-18 09:31:28 -04:00
setup.py initial commit of bespin python server that is separate from the bespin 2009-09-23 09:57:21 -04:00

README.txt

Bespin Python Server
====================

This program provides the server side functionality for Bespin. Though there
is nothing Mac or Unix specific to the Bespin server, at the moment it
has only been tested on Unix-like platforms.

Understanding the Code
----------------------

The BespinServer is built entirely out of WSGI components (to see which 
packages are used, check out requirements.txt).

In development, the data is stored in an sqlite database (devdata.db).
SQLAlchemy (http://www.sqlalchemy.org) manages the persistence of the
data.

bespin/model.py contains the model objects and the "manager" objects that
know how to store and retrieve them from the database for use by the web
layer. These manager objects are inserted into the WSGI environment.

There is a very trivial "web framework" in bespin/framework.py. This provides
a simple wrapper for:

1. Handling authentication as needed (which is most URLs)
2. Providing Request and Response objects that are simpler to use than the
   standard WSGI environ, start_response parameters. These are just small
   subclasses of WebOb's Request and Response.
3. Providing a decorator that expresses which URL a given function responds
   to (wrapping the behavior of urlrelay).

Authentication is handled via Paste's AuthTKTMiddleware, which puts
an authentication token into a cookie.
   
bespin/controllers.py contains the functions that respond to the URLs. It
also contains the make_app function, which knows how to construct the WSGI
application that will appear on the web.

bespin/config.py knows how to configure the system based on "profiles"
such as "test", "dev" and "prod".

bespin/tests contains the unit tests.