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

« back to all changes in this revision

Viewing changes to www/dispatch/html.py

  • Committer: wagrant
  • Date: 2008-09-20 09:31:13 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1057
www.dispatch.{request,html}: Allow apps to turn off the JS that is
    normally inserted into <head> by setting a property on req.

www.dispatch: Turn off the default JS when rendering errors; it's
              useless and encourages people to endanger themselves
              by enabling JS on the public site.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        username = repr(req.user.login)
59
59
    else:
60
60
        username = "null"
61
 
    req.write("""  <script type="text/javascript">
 
61
    if req.write_javascript_settings:
 
62
        req.write("""  <script type="text/javascript">
62
63
    root_dir = %s;
63
64
    public_host = %s;
64
65
    username = %s;