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

« back to all changes in this revision

Viewing changes to www/dispatch/__init__.py

  • Committer: dilshan_a
  • Date: 2008-01-24 04:52:56 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:283
Fixed a bug where variables were persistent across test cases.

Added initial minutes/report/documentation on tutorials.

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
 
62
70
    # app is the App object for the chosen app
63
71
    if req.app is None:
64
 
        app = conf.apps.app_url[conf.default_app]
 
72
        app = conf.apps.app_url[conf.apps.default_app]
65
73
    else:
66
74
        app = conf.apps.app_url[req.app]
67
75
 
77
85
        # If user did not specify an app, HTTP redirect to default app and
78
86
        # exit.
79
87
        if req.app is None:
80
 
            req.throw_redirect(util.make_path(conf.default_app))
 
88
            req.throw_redirect(util.make_path(conf.apps.default_app))
81
89
 
82
90
        # Set the default title to the app's tab name, if any. Otherwise URL
83
91
        # name.