Skip to content

Instantly share code, notes, and snippets.

@epifanio
Created April 7, 2024 09:42
Show Gist options
  • Save epifanio/83bdf16d686fcf94b917b9a6cb3bb888 to your computer and use it in GitHub Desktop.
Save epifanio/83bdf16d686fcf94b917b9a6cb3bb888 to your computer and use it in GitHub Desktop.
template.py
template = """
{% extends base %}
<!-- goes in head -->
{% block postamble %}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
{% endblock %}
<!-- goes in body -->
{% block contents %}
{{ app_title }}
<p>This is a Panel app with a custom template allowing us to compose multiple Panel objects into a single HTML document.</p>
<br>
<div class="container">
<div class="row">
<div class="col-sm">
{{ embed(roots.A) }}
</div>
</div>
</div>
{% endblock %}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment