##// END OF EJS Templates
Merge pull request #6654 from Carreau/closes-6647...
Min RK -
r18293:4515e355 merge
parent child Browse files
Show More
@@ -24,6 +24,8 b' try:'
24 24 except ImportError:
25 25 app_log = logging.getLogger()
26 26
27 import IPython
28
27 29 from IPython.config import Application
28 30 from IPython.utils.path import filefind
29 31 from IPython.utils.py3compat import string_types
@@ -398,6 +400,13 b' class FileFindHandler(web.StaticFileHandler):'
398 400 return super(FileFindHandler, self).validate_absolute_path(root, absolute_path)
399 401
400 402
403 class ApiVersionHandler(IPythonHandler):
404
405 @json_errors
406 def get(self):
407 # not authenticated, so give as few info as possible
408 self.finish(json.dumps({"version":IPython.__version__}))
409
401 410 class TrailingSlashHandler(web.RequestHandler):
402 411 """Simple redirect handler that strips trailing slashes
403 412
@@ -456,5 +465,6 b' file_path_regex = "%s/%s" % (path_regex, file_name_regex)'
456 465
457 466
458 467 default_handlers = [
459 (r".*/", TrailingSlashHandler)
468 (r".*/", TrailingSlashHandler),
469 (r"api", ApiVersionHandler)
460 470 ]
General Comments 0
You need to be logged in to leave comments. Login now