Skip to content

Commit

Permalink
add get_template_as_string method
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed Oct 11, 2023
1 parent 0dde12a commit 8927210
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dvc_render/vega.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ def get_partial_filled_template(self):
)
return content, {"anchor_definitions": self._split_content}

def get_template_as_string(self):
"""
Returns unfilled template as a string (for Studio)
"""
return json.dumps(self.template.content)

def partial_html(self, **kwargs) -> str:
return self.get_filled_template() # type: ignore

Expand Down

0 comments on commit 8927210

Please sign in to comment.