Skip to content

Commit

Permalink
Replace jinja2 with markdown for loading the warning message docu…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
edan-bainglass committed Dec 14, 2024
1 parent 3019e89 commit 0276683
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions home/start_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,12 @@ def move_updown(self, name, delta):
self.write_config(config)

def _create_notification(self, content):
from IPython.display import Markdown, display
from jinja2 import Environment
from markdown import Markdown

env = Environment()
notification = env.from_string(content).render()
output = ipw.Output()
notification_widget = ipw.VBox(children=[output])
md = Markdown()
html = md.convert(content)
notification_widget = ipw.HTML(html)
notification_widget.add_class("home-notification")
with output:
display(Markdown(notification))
return notification_widget


Expand Down

0 comments on commit 0276683

Please sign in to comment.