Custom REPL demo is missing utils.py #1482
pedrokarneiro
started this conversation in
General
Replies: 1 comment
-
Thanks, this is being tackled in here: #1485 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Custom REPL demo is missing utils.py in the 'View code' tab.
Problem:
If you try to copy the solution, a 403 error will come up due to this absence.
Solution:
Add a utils.py to your solution with the following code:
`
from datetime import datetime as dt
def format_date(dt_, fmt="%m/%d/%Y, %H:%M:%S"):
return f"{dt_:{fmt}}"
def now(fmt="%m/%d/%Y, %H:%M:%S"):
return format_date(dt.now(), fmt)
def remove_class(element, class_name):
element.element.classList.remove(class_name)
def add_class(element, class_name):
element.element.classList.add(class_name)
`
Beta Was this translation helpful? Give feedback.
All reactions