aiidalab / aiidalab/aiidalab-widgets-base
Find a way to get a "root url" in Jupyter
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 19
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 20
Mô tả
For the moment there is no nice way to make cross-apps link.
@oschuett pointed out that appmode injects a variable called `jupyter_notebook_url` that contains a notebook's url, something like:
https://server.com/user/user_id/notebooks/apps/some_folder/some_notebook.ipynb
However, there is no variable that points to Jupyter's root folder: https://server.com/user/user_id/notebooks/
Again, a suggestion from @oschuett was to use javascript for this purpose:
```
%%javascript
alert(Jupyter.notebook.base_url);
```
Unless there is a better way to do it I will stick to this solution.
@ltalirz @giovannipizzi @CasperWA any ideas?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.