~ubuntu-branches/ubuntu/raring/ipython/raring

« back to all changes in this revision

Viewing changes to IPython/frontend/html/notebook/notebookapp.py

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2012-10-16 01:03:41 UTC
  • mfrom: (1.2.19)
  • Revision ID: package-import@ubuntu.com-20121016010341-x6dmefdgqta4aev8
Tags: 0.13.1~rc3-0ubuntu1
* New upstream bugfix release candidate, commit 5f1e6abdf63
* refresh patches, drop applied except-shadows-builtin-fix.patch
* depend on libjs-jquery >= 1.7 (Closes: #685986)
* drop build depends on dh-linktree and libjs-jquery-ui (Closes: #685985)
  - needs to be added again when we can use the packaged jquery-ui
* drop LC_ALL=C.UTF-8 from build and install, not required anymore
* override dh_python[23] to work around #683108
* build depend on libc-bin (>= 2.13-1~) for C.UTF-8 locale used in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
            (r"/clusters/%s" % _profile_regex, ClusterProfileHandler),
142
142
        ]
143
143
 
 
144
        # Python < 2.6.5 doesn't accept unicode keys in f(**kwargs), and
 
145
        # base_project_url will always be unicode, which will in turn
 
146
        # make the patterns unicode, and ultimately result in unicode
 
147
        # keys in kwargs to handler._execute(**kwargs) in tornado.
 
148
        # This enforces that base_project_url be ascii in that situation.
 
149
        # 
 
150
        # Note that the URLs these patterns check against are escaped,
 
151
        # and thus guaranteed to be ASCII: 'héllo' is really 'h%C3%A9llo'.
 
152
        base_project_url = py3compat.unicode_to_str(base_project_url, 'ascii')
 
153
 
144
154
        if os.path.exists("/usr/share/javascript/mathjax/MathJax.js"):
145
155
          handlers.append((r"/mathjax/(.*)", web.StaticFileHandler,
146
156
                           {"path": "/usr/share/javascript/mathjax"}))
147
 
 
 
157
        
148
158
        settings = dict(
149
159
            template_path=os.path.join(os.path.dirname(__file__), "templates"),
150
160
            static_path=os.path.join("/usr/share/ipython/notebook/static"),
151
161
            cookie_secret=os.urandom(1024),
152
 
            login_url="/login",
 
162
            login_url="%s/login"%(base_project_url.rstrip('/')),
153
163
        )
154
164
 
155
165
        # allow custom overrides for the tornado web app.
156
166
        settings.update(settings_overrides)
157
167
 
158
 
        # Python < 2.6.5 doesn't accept unicode keys in f(**kwargs), and
159
 
        # base_project_url will always be unicode, which will in turn
160
 
        # make the patterns unicode, and ultimately result in unicode
161
 
        # keys in kwargs to handler._execute(**kwargs) in tornado.
162
 
        # This enforces that base_project_url be ascii in that situation.
163
 
        # 
164
 
        # Note that the URLs these patterns check against are escaped,
165
 
        # and thus guaranteed to be ASCII: 'héllo' is really 'h%C3%A9llo'.
166
 
        base_project_url = py3compat.unicode_to_str(base_project_url, 'ascii')
167
 
        
168
168
        # prepend base_project_url onto the patterns that we match
169
169
        new_handlers = []
170
170
        for handler in handlers: