-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Static HTML Exporting #311
Conversation
659d1be
to
46fa5aa
Compare
46fa5aa
to
5e4ce94
Compare
'css' and the main 'html'. | ||
""" | ||
cls_type = type(self) | ||
renderers = (cls_type,) + cls_type.__bases__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the need for this approach. Why not use this sort of pattern?
class BaseClass(object):
js_dependencies = {'jquery':'url1'}
class Subclass(BaseClass):
js_dependencies = dict(BaseClass.js_dependencies, **{'d3':'url2'})
Then you could use self.js_dependencies
, self.css_dependencies
etc and you'll be able to get all the dependencies directly from the class attribute without iterating through the class hierarchy like this. Maybe I am missing something here?
Looks good! Other than the commit comment above, it looks fine. The only thing I would want before merging are a couple of (simple) unit tests. |
67f00fa
to
b4d9e83
Compare
Ok, now all the tests are passing (including the new ones) it is time to merge! |
Added support for exporting static HTML from Renderers
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This implements the suggestion for static HTML export in #282. It accepts an optional template argument with three optional fields js, css and html. It's not quite ready for merge but already works.