first commit
This commit is contained in:
commit
a3dbf9cbe3
16 files changed
+471
No files matched your search
@@ -0,0 +1,8 @@
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
|
||||
def format(soup: BeautifulSoup) -> None:
|
||||
for element in soup.find_all(attrs={"dj-static": True}):
|
||||
tag, value = element.get("dj-static").split(";")
|
||||
element[tag] = f"{{% static '{value}' %}}"
|
||||
del element.attrs["dj-static"]
|
||||
Reference in new issue
Block a user