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

« back to all changes in this revision

Viewing changes to www/dispatch/__init__.py

  • Committer: mattgiuca
  • Date: 2008-01-09 03:23:58 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:134
Added module: common/makeuser.py. Creates a new user jail by hardlinking the
jail template.
Added script: trunk/makeuser.py. Command-line script to run the above module
and create a user.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
            # TODO: Nicer 404 message?
60
60
            req.throw_error(Request.HTTP_NOT_FOUND)
61
61
 
62
 
    # Special handling for public mode - just call public app and get out
63
 
    # NOTE: This will not behave correctly if the public app uses
64
 
    # write_html_head_foot, but "serve" does not.
65
 
    if req.publicmode:
66
 
        app = conf.apps.app_url[conf.apps.public_app]
67
 
        apps.call_app(app.dir, req)
68
 
        return req.OK
69
 
 
70
62
    # app is the App object for the chosen app
71
63
    if req.app is None:
72
 
        app = conf.apps.app_url[conf.apps.default_app]
 
64
        app = conf.apps.app_url[conf.default_app]
73
65
    else:
74
66
        app = conf.apps.app_url[req.app]
75
67
 
85
77
        # If user did not specify an app, HTTP redirect to default app and
86
78
        # exit.
87
79
        if req.app is None:
88
 
            req.throw_redirect(util.make_path(conf.apps.default_app))
 
80
            req.throw_redirect(util.make_path(conf.default_app))
89
81
 
90
82
        # Set the default title to the app's tab name, if any. Otherwise URL
91
83
        # name.