Skip to content

Commit b8e9580

Browse files
authored
Revert "Use native Django admin interface to support dark mode" (#2871)
1 parent c32b050 commit b8e9580

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

base-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
dj-database-url==0.5.0
22
django-pipeline==3.1.0 # 3.0.0 is first version that supports Django 4.2
33
django-sitetree==1.18.0 # >=1.17.1 is (?) first version that supports Django 4.2
4+
django-apptemplates==1.5
5+
django-admin-interface==0.28.9
6+
django-translation-aliases==0.1.0
47
Django==4.2.27
58
docutils==0.21.2
69
Markdown==3.7

pydotorg/settings/base.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,15 @@
123123
TEMPLATES = [
124124
{
125125
'BACKEND': 'django.template.backends.django.DjangoTemplates',
126-
'DIRS': [TEMPLATES_DIR],
127-
'APP_DIRS': True,
126+
'DIRS': [
127+
TEMPLATES_DIR,
128+
],
128129
'OPTIONS': {
130+
'loaders': [
131+
'apptemplates.Loader',
132+
'django.template.loaders.filesystem.Loader',
133+
'django.template.loaders.app_directories.Loader',
134+
],
129135
'context_processors': [
130136
'django.template.context_processors.debug',
131137
'django.template.context_processors.i18n',
@@ -184,10 +190,13 @@
184190
'django.contrib.staticfiles',
185191
'django.contrib.humanize',
186192

193+
'admin_interface',
194+
'colorfield',
187195
'django.contrib.admin',
188196
'django.contrib.admindocs',
189197

190198
'django_celery_beat',
199+
'django_translation_aliases',
191200
'pipeline',
192201
'sitetree',
193202
'imagekit',

templates/admin/base_site.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{% extends "admin/base.html" %}
1+
{% extends "admin_interface:admin/base_site.html" %}
22
{% load i18n %}
33

44
{% block title %}{{ title }} | {% trans 'python.org' %}{% endblock %}
55

66
{% block branding %}
7-
<h1 id="site-name"><a href="{% url 'admin:index' %}">{% trans 'python.org administration' %}</a></h1>
7+
<h1 id="site-name">{% trans 'python.org administration' %}</h1>
88
{% endblock %}
99

1010
{% block nav-global %}{% endblock %}

0 commit comments

Comments
 (0)