Commits

Luke Plant committed 7f1c467

More sensible way to add base.css into template.

This also fixes bugs which can occur with stylesheets:

If admin/base_site.html has stylesheets added in extrahead that override
definitions in base.css, by virtue of coming later on the page, putting
base.css later in the page will break that.

Also, if the user has overridden the stylesheet block in their base_site,
this will also be broken by livesettings also setting this block.

  • Participants
  • Parent commits 41daf73

Comments (0)

Files changed (2)

livesettings/templates/livesettings/group_settings.html

 {% load i18n config_tags %}{% load url from future %}
 {% block extrastyle %}
 {{ block.super }}
-<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}" />
+<link rel="stylesheet" type="text/css" href="{% static 'admin/css/forms.css' %}" />
 {% endblock %}
 
-{% block stylesheet %}{% static "admin/css/forms.css" %}{% endblock %}
 {% block coltype %}colMS{% endblock %}
 {% block bodyclass %}dashboard{% endblock %}
 {% block userlinks %}<a href="{% url 'admin:index' %}doc/">{% trans 'Documentation' %}</a> / <a href="{% url 'admin:index' %}password_change/">{% trans 'Change password' %}</a> / <a href="{% url 'admin:index' %}logout/">{% trans 'Log out' %}</a>{% endblock %}

livesettings/templates/livesettings/site_settings.html

 {% extends "admin/base_site.html" %}
 {% load i18n admin_static config_tags %}{% load url from future %}
 
-{% block stylesheet %}{% static "admin/css/forms.css" %}{% endblock %}
-
 {% block extrahead %}{{ block.super }}
 <script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
 <script type="text/javascript" src="{% static "admin/js/core.js" %}"></script>
 
 {% block extrastyle %}
 {{ block.super }}
-<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}" />
+<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />
 <style type="text/css">
     ul.fieldref { margin: 0; padding: 0; font-size: 9px; }
     ul.fieldref li { float: left; margin: 0 10px 0 0; list-style: none; }