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

Remove magic for loading templates from module names #4724

Closed
wants to merge 2 commits into from

Conversation

takluyver
Copy link
Member

This specifies the template names in the exporter class, rather than getting them from the module names, which seemed a bit too magical.

Also, the latex templates got renamed from latex/latex_foo.tplx to latex/foo.tplx.

At present, when specifying a template to use, you have to specify the full template name, e.g. html_basic, not just basic. We probably want to think more about this, but I wanted to put the code up for review before I flew home, and I've had too many glasses of scotch to think about it just now. ;-)

return 'tex'

def _template_file_default(self):
return 'article'

file_extension = Unicode(
Copy link
Member

Choose a reason for hiding this comment

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

Why you didn't delete this one? You have replace it (above) by _file_extension_default...

@damianavila
Copy link
Member

Except from the latex Exporter (which is using it for other things), all the exporters import Unicode from trailets but is not used any more with your PR. Don't you want to avoid the import?

Regardless of the comments I made above, I like the idea to remove the magic of loading templates...

@takluyver
Copy link
Member Author

Both valid points, and I'll fix them. I'm going to open a new PR, though, because I accidentally committed on my master branch.

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.

None yet

2 participants