Skip to content

Instantly share code, notes, and snippets.

@ryan-blunden
Created November 24, 2013 05:36
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 ryan-blunden/7623756 to your computer and use it in GitHub Desktop.
Save ryan-blunden/7623756 to your computer and use it in GitHub Desktop.
Simple extension of Django admin base_template.html so you can change the title displayed on the login and header, as well as adding custom JavaScript and CSS files for extra functionality and styling.
{% extends "admin/base.html" %}
{% load i18n %}
{# Customize the branding in the login form #}
{% block title %}{{ title }} | {% trans 'Site Name Admin' %}{% endblock %}
{% block extrastyle %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/django-admin-theme.css" media="screen"/>
{% endblock %}
{% block extrahead %}
<!-- Include extra JavaScript files... -->
{% endblock %}
{% block branding %}
{# Customize the branding in the header #}
<h1 id="site-name">{% trans 'Site Name Admin' %}</h1>
{% endblock %}
{% block nav-global %}{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment