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

Specify default template files with extension #639

Merged
merged 1 commit into from
Aug 7, 2017

Conversation

takluyver
Copy link
Member

This should make issues like ipython/ipython#10731 less likely. At present, if you have a file in the working directory called python or rst or article (and so on) with no extension, nbconvert will try to use that as the template. Honestly, I'm surprised this hasn't come up more.

With this change, it will only look for the default template files with their extension. So you can still override it with a file called python.tpl, for instance. But that's less likely to be there accidentally than python.

@mpacer
Copy link
Member

mpacer commented Aug 7, 2017

Merging, but should we go through the trouble to also check that a .tpl is actually given in all cases (perhaps excepting CLI's)?

@mpacer mpacer merged commit a96bfdd into jupyter:master Aug 7, 2017
@takluyver takluyver deleted the template-file-exts branch August 7, 2017 09:07
@takluyver
Copy link
Member Author

IIRC we made the extension required at one point and broke some people's code. We could go through a proper deprecation cycle to make it required, but I don't think it's worth it. Our config system also makes it difficult to treat command line options differently from options in config files or third party Python code.

@mpacer mpacer added unlogged and removed unlogged labels Aug 31, 2017
nfultz added a commit to nfultz/nb2mail that referenced this pull request Jun 8, 2018
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