I use something like that as a starting template, with bootstrap 4
<!doctype html>
{% load staticfiles %}
<meta charset=utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{% block title %}WEBSITE{% endblock %}</title>
<link rel=stylesheet href="{% static "bootstrap.min.css" %}">
{% block head %}
{% endblock %}
<nav class="navbar navbar-light bg-faded">
<a class=navbar-brand href="{% url "site:index" %}">WEBSITE</a>
<ul class="nav navbar-nav">
<li class=nav-item>
<a class=nav-link href="{% url "site:about" %}">ABOUT</a>
<li class=nav-item>
<a class=nav-link href="{% url "site:search" %}">SEARCH</a>
</ul>
</nav>
<header class=jumbotron>
<div class=container>{% block header %}
<h1>WEBSITE</h1>{% endblock %}
</div>
</header>
<div class=container> {% block body %}
{% endblock %}</div>
The idea is to have your layout in base.html and only fill the block
with your content.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
django-users...@googlegroups.com.
> To post to this group, send email to
django...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/django-users.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/d7b92aa1-6722-44f9-88fd-e562a4d76045%40googlegroups.com.
>
> For more options, visit
https://groups.google.com/d/optout.
--
Cordialement, Coues Ludovic
+336 148 743 42