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

« back to all changes in this revision

Viewing changes to ivle/dispatch/html.py

  • Committer: William Grant
  • Date: 2009-01-22 04:47:42 UTC
  • mfrom: (1080.1.93 storm)
  • Revision ID: grantw@unimelb.edu.au-20090122044742-sa8gnww0ma2bm2rv
Merge Storm branch. ivle.db is dead. Watch out for the schema change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    # Write inline JavaScript which gives the client code access to certain
55
55
    # server-side variables.
56
56
    if req.user:
57
 
        username = repr(req.user.login)
 
57
        username = '"%s"' % req.user.login
58
58
    else:
59
59
        username = "null"
60
60
    if req.write_javascript_settings:
61
61
        req.write("""  <script type="text/javascript">
62
 
    root_dir = %s;
63
 
    public_host = %s;
 
62
    root_dir = "%s";
 
63
    public_host = "%s";
64
64
    username = %s;
65
65
  </script>
66
 
""" % (repr(ivle.conf.root_dir), repr(ivle.conf.public_host), username))
 
66
""" % (ivle.conf.root_dir, ivle.conf.public_host, username))
67
67
    iconurl = get_icon_url(req.app, small=True)
68
68
    if iconurl:
69
69
        req.write("""  <link rel="shortcut icon" href="%s" />