Skip to content

Commit 90c59b4

Browse files
committed
Refs #23433 -- Removed django-admin.py entry point per deprecation timeline.
1 parent 68e3ca1 commit 90c59b4

File tree

6 files changed

+18
-74
lines changed

6 files changed

+18
-74
lines changed

django/bin/django-admin.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/releases/4.0.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,5 @@ to remove usage of these features.
273273
right-hand side.
274274

275275
* The ``django.db.models.query_utils.InvalidQuery`` exception class is removed.
276+
277+
* The ``django-admin.py`` entry point is removed.

extras/django_bash_completion

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,15 @@ _django_completion()
3636
COMP_CWORD=$COMP_CWORD \
3737
DJANGO_AUTO_COMPLETE=1 $1 ) )
3838
}
39-
# When the django-admin.py deprecation ends, remove django-admin.py.
40-
complete -F _django_completion -o default django-admin.py manage.py django-admin
39+
complete -F _django_completion -o default manage.py django-admin
4140

4241
_python_django_completion()
4342
{
4443
if [[ ${COMP_CWORD} -ge 2 ]]; then
4544
local PYTHON_EXE=${COMP_WORDS[0]##*/}
4645
if echo "$PYTHON_EXE" | grep -qE "python([3-9]\.[0-9])?"; then
4746
local PYTHON_SCRIPT=${COMP_WORDS[1]##*/}
48-
if echo "$PYTHON_SCRIPT" | grep -qE "manage\.py|django-admin(\.py)?"; then
47+
if echo "$PYTHON_SCRIPT" | grep -qE "manage\.py|django-admin"; then
4948
COMPREPLY=( $( COMP_WORDS=( "${COMP_WORDS[*]:1}" )
5049
COMP_CWORD=$(( COMP_CWORD-1 ))
5150
DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} ) )

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ project_urls =
3636
[options]
3737
python_requires = >=3.6
3838
packages = find:
39-
# When the django-admin.py deprecation ends, remove "scripts".
40-
scripts = django/bin/django-admin.py
4139
include_package_data = true
4240
zip_safe = false
4341
install_requires =

tests/admin_scripts/test_django_admin_py.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

tests/admin_scripts/tests.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ def assertNotInOutput(self, stream, msg):
167167
##########################################################################
168168
# DJANGO ADMIN TESTS
169169
# This first series of test classes checks the environment processing
170-
# of the django-admin.py script
170+
# of the django-admin.
171171
##########################################################################
172172

173173

174174
class DjangoAdminNoSettings(AdminScriptTestCase):
175-
"A series of tests for django-admin.py when there is no settings.py file."
175+
"A series of tests for django-admin when there is no settings.py file."
176176

177177
def test_builtin_command(self):
178178
"no settings: django-admin builtin commands fail with an error when no settings provided"
@@ -207,7 +207,8 @@ def test_commands_with_invalid_settings(self):
207207

208208

209209
class DjangoAdminDefaultSettings(AdminScriptTestCase):
210-
"""A series of tests for django-admin.py when using a settings.py file that
210+
"""
211+
A series of tests for django-admin when using a settings.py file that
211212
contains the test application.
212213
"""
213214
def setUp(self):
@@ -273,7 +274,8 @@ def test_custom_command_with_environment(self):
273274

274275

275276
class DjangoAdminFullPathDefaultSettings(AdminScriptTestCase):
276-
"""A series of tests for django-admin.py when using a settings.py file that
277+
"""
278+
A series of tests for django-admin when using a settings.py file that
277279
contains the test application specified using a full path.
278280
"""
279281
def setUp(self):
@@ -340,7 +342,8 @@ def test_custom_command_with_environment(self):
340342

341343

342344
class DjangoAdminMinimalSettings(AdminScriptTestCase):
343-
"""A series of tests for django-admin.py when using a settings.py file that
345+
"""
346+
A series of tests for django-admin when using a settings.py file that
344347
doesn't contain the test application.
345348
"""
346349
def setUp(self):
@@ -406,8 +409,9 @@ def test_custom_command_with_environment(self):
406409

407410

408411
class DjangoAdminAlternateSettings(AdminScriptTestCase):
409-
"""A series of tests for django-admin.py when using a settings file
410-
with a name other than 'settings.py'.
412+
"""
413+
A series of tests for django-admin when using a settings file with a name
414+
other than 'settings.py'.
411415
"""
412416
def setUp(self):
413417
super().setUp()
@@ -472,7 +476,8 @@ def test_custom_command_with_environment(self):
472476

473477

474478
class DjangoAdminMultipleSettings(AdminScriptTestCase):
475-
"""A series of tests for django-admin.py when multiple settings files
479+
"""
480+
A series of tests for django-admin when multiple settings files
476481
(including the default 'settings.py') are available. The default settings
477482
file is insufficient for performing the operations described, so the
478483
alternate settings must be used by the running script.
@@ -541,7 +546,7 @@ def test_custom_command_with_environment(self):
541546

542547
class DjangoAdminSettingsDirectory(AdminScriptTestCase):
543548
"""
544-
A series of tests for django-admin.py when the settings file is in a
549+
A series of tests for django-admin when the settings file is in a
545550
directory. (see #9751).
546551
"""
547552

0 commit comments

Comments
 (0)