Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable query parameter passing #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

marqh
Copy link

@marqh marqh commented Jul 27, 2016

Hi @takluyver

Great tool, many thanks.

I have a proposed adaption, which enable query parameters to be passed to the notebook to be opened.

This enables a number of use cases to be addressed, including

https://localhost:8888/notebooks/explore.ipynb?dashboard

opening the notebook in dashboard view

I hope this seems like a useful feature. Is the implementation up to scratch?

cheers
mark

notebook_url = url_path_join('notebooks', url_escape(path))
if query:
notebook_url = notebook_url + query
notebookapp.launch_new_instance(default_url=notebook_url,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default_url will, for the lifetime of the notebook server it starts, redirect requests for / to default_url. I'd rather not change the behaviour of the notebook server like that just to get it to open the right page once.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, this is behaviour which affects a number of aspects.

I will investigate a plausible alternative

@marqh
Copy link
Author

marqh commented Aug 5, 2016

Hi @takluyver

I have altered the approach, such that the process to open a new notebook can be held in a thread whilst a new server is created, if required

this has the advantage that the logic for opening a notebook is encapsulated, rather than being different for a new server or an already open one

however, there are aspects that I think could be neater, for example, there is an arbitrary time to wait, which seems a bit inelegant

if you like the approach in principle, I can look to tidy up the implementation; any suggestions on this are most welcome
However, if the approach raises significant concerns for you, let me know and i'll not pursue it further

thank you
mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants