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

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

ivle.dispatch{,.{login,request}}: Fix mod_python imports to ensure that we can
    be imported from outside Apache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
from ivle import util
43
43
import ivle.conf
44
44
import ivle.conf.apps
 
45
from ivle.dispatch.request import Request
 
46
from ivle.dispatch import login
45
47
import apps
46
48
import html
47
49
import plugins.console # XXX: Relies on www/ being in the Python path.
77
79
 
78
80
    req: An Apache request object.
79
81
    """
80
 
    from ivle.dispatch.request import Request
81
82
    # Make the request object into an IVLE request which can be passed to apps
82
83
    apachereq = req
83
84
    try:
107
108
    just used to catch exceptions.
108
109
    Takes both an IVLE request and an Apache req.
109
110
    """
110
 
    from ivle.dispatch import login
111
 
    from ivle.dispatch.request import Request
112
 
 
113
111
    # Hack? Try and get the user login early just in case we throw an error
114
112
    # (most likely 404) to stop us seeing not logged in even when we are.
115
113
    if not req.publicmode: