Ticket #13535: trac_13535_live_introspection_flask-nt.patch

File trac_13535_live_introspection_flask-nt.patch, 1.2 KB (added by nthiery, 10 years ago)
  • flask_version/worksheet.py

    # HG changeset patch
    # User Nicolas M. Thiery <nthiery@users.sf.net>
    # Date 1352800871 -3600
    # Node ID 8e84bf0add7e8ffef7351aa56987043bed60e5be
    # Parent  6be0375abd3c79b3b6a48301c7baaf3a8b7fb34e
    #13535: Fix instrospection/... in live documentation with the flask notebook
    This patch fixes the white list to enable some missing notebook
    actions and features in the live documentation:
    - Introspection
    - Delete all output
    - Copy worksheet
    - New cell after
    - Restart Sage
    And certainly more.
    diff --git a/flask_version/worksheet.py b/flask_version/worksheet.py
    a b def worksheet_command(target, **route_kw 
    111111                if target.split('/')[0] not in ['alive', 'cells', 'cell_update',
    112112                          'data', 'download', 'edit_published_page', 'eval',
    113113                          'quit_sage', 'rate', 'rating_info', 'new_cell_before',
    114                           'new_cell_after']:
     114                          'new_cell_after','introspect','delete_all_output','copy','restart_sage']:
    115115                    raise NotImplementedError("User _sage_ can not access URL %s"%target)
    117117            #Make worksheet a non-keyword argument appearing before the