Update instrument export command to include more html tags
This commit is contained in:
parent
fcc38047b1
commit
bb6425c27f
|
|
@ -29,9 +29,19 @@ class Command(BaseCommand):
|
|||
|
||||
def handle(self, *args, **options):
|
||||
# todo: only published after X: Page.last_published_at > X
|
||||
print("<html><head></head><body>")
|
||||
print(
|
||||
"""
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
"""
|
||||
)
|
||||
for i in BasicKnowledge.objects.live().filter(slug__in=options["slugs"]):
|
||||
print(f"<h1>{i.title}</h1>")
|
||||
print(f"<p>{i.intro}</p>")
|
||||
for c in i.contents:
|
||||
action = actions.get(
|
||||
c.block_type, lambda c: print(f"==={c.block_type}===")
|
||||
|
|
|
|||
Loading…
Reference in New Issue