Skip to content
Snippets Groups Projects
Commit 0dbd7c0b authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Upgrade Django to 3.2

Bump to latest version of Django 3.2
Fix dark theme issue by fixing the order of css imports in admin
Cleanup admin login template (remove copied code as far as possible)
parent 3d1b61e7
No related branches found
No related tags found
No related merge requests found
{% extends "admin/base_site.html" %} {% extends "admin/login.html" %}
{% load i18n static %} {% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/login.css" %}">
{{ form.media }}
{% endblock %}
{% block bodyclass %}{{ block.super }} login{% endblock %}
{% block usertools %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block nav-sidebar %}{% endblock %}
{% block content_title %}{% endblock %}
{% block breadcrumbs %}{% endblock %}
{% block content %} {% block content %}
{% if form.errors and not form.non_field_errors %} {% if form.errors and not form.non_field_errors %}
......
/*
Load both the django admin base style and bootstrap -- but make sure bootstrap is loaded first to override all critical theme settings from bootstrap with the default admin style.
This especially fixes the dark theme.
*/
@import "/static/common/css/bootstrap.css";
@import "../../admin/css/base.css";
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
{% load fontawesome_5 %} {% load fontawesome_5 %}
{% load static %} {% load static %}
{% block stylesheet %}{% static "common/css/admin-bootstrap.css" %}{% endblock %}
{% block extrastyle %} {% block extrastyle %}
{% if not debug %} {% if not debug %}
<link rel="stylesheet" type="text/css" href="{% static "common/css/admin-color.css" %}"/> <link rel="stylesheet" type="text/css" href="{% static "common/css/admin-color.css" %}"/>
...@@ -12,7 +14,6 @@ ...@@ -12,7 +14,6 @@
{% block extrahead %} {% block extrahead %}
<!-- Load bootstrap, jquery and fontawesome--> <!-- Load bootstrap, jquery and fontawesome-->
{% bootstrap_css %}
{% bootstrap_javascript jquery=True %} {% bootstrap_javascript jquery=True %}
{% fontawesome_5_static %} {% fontawesome_5_static %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment