Skip to content

Instantly share code, notes, and snippets.

@AndyLPK247
Created December 15, 2017 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndyLPK247/d7f20ccd5620f64d761ec546fd9eb37a to your computer and use it in GitHub Desktop.
Save AndyLPK247/d7f20ccd5620f64d761ec546fd9eb37a to your computer and use it in GitHub Desktop.
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 %}
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}" />
</head>
{% endblock %}
<body>
{% block content %}
{% endblock %}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment