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

Static HTML Exporting #311

Merged
merged 7 commits into from
Dec 1, 2015
Merged

Static HTML Exporting #311

merged 7 commits into from
Dec 1, 2015

Conversation

philippjfr
Copy link
Member

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.

@philippjfr philippjfr added this to the v1.4.0 milestone Dec 1, 2015
@philippjfr philippjfr added the type: feature A major new feature label Dec 1, 2015
@philippjfr philippjfr self-assigned this Dec 1, 2015
'css' and the main 'html'.
"""
cls_type = type(self)
renderers = (cls_type,) + cls_type.__bases__
Copy link
Contributor

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?

@jlstevens
Copy link
Contributor

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.

@jlstevens
Copy link
Contributor

Ok, now all the tests are passing (including the new ones) it is time to merge!

jlstevens added a commit that referenced this pull request Dec 1, 2015
Added support for exporting static HTML from Renderers
@jlstevens jlstevens merged commit 858bffb into master Dec 1, 2015
@philippjfr philippjfr deleted the static_html branch December 1, 2015 19:28
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature A major new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants