kratos2333
2/11/2019 - 10:20 AM

Flask HTML Inheritance

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Puppy Rock</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
      <a class="navbar-brand" href="#">Puppies Rock!</a>
    </nav>
    {% block content %}
    {% endblock %}
  </body>
</html>
{% extends "base.html"%}
{% block content %}
<h1>This is the home page.</h1>
<h2>Go to /puppy/name</h2>
{% endblock %}