~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/__init__.py

  • Committer: mattgiuca
  • Date: 2008-02-01 06:42:06 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:373
db.py: Did some research on PGSQL string literals. Added E' to the front of
    string escapes. (For reasons explained in comments, with a link).
    I think this is now sanitized correctly. Obviously should test more.
    Was able to add little Bobby Tables to the db ;)
    Added update_user function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# Loads IVLE applications.
23
23
# All sub-packages in this package are apps.
24
24
 
 
25
from mod_python import apache
 
26
 
25
27
def call_app(appname, req):
26
28
    """Calls an application with the given name. Passes req to the app's
27
29
    handler."""
32
34
    except ImportError:
33
35
        # Any problems meant it's a server error, because conf/apps.py said
34
36
        # this app would be here.
35
 
        req.throw_error(req.HTTP_INTERNAL_SERVER_ERROR,
36
 
            "Could not load the %s application." % repr(appname))
 
37
        raise apache.SERVER_RETURN, apache.HTTP_INTERNAL_SERVER_ERROR