Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Django parent template example that sets the favicon
<!DOCTYPE html>
<!-- This is a basic example of a Django parent template. -->
<!-- It adds a favicon to the page. -->
<!-- The title is set by overriding the "title" block. -->
<!-- Body content is added by overriding the "content" block. -->
<!-- Tweak this parent template to meet your project's needs. -->
{% load static %}
<html lang="en">
{% block head %}
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}" />
{% endblock %}
{% block content %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment