Commit Graph

175 Commits

Author SHA1 Message Date
Mariusz Felisiak 75d7af43c1
Corrected docstring quotes in various code. 2020-09-22 10:30:53 +02:00
René Fleschenberg 578b3046e3 Reverted "Refs #23919 -- Removed obsolete __init__.py files in management command directories."
This reverts commit ccc25bfe4f.

https://groups.google.com/d/topic/django-developers/GVHMH2ciAnk/discussion
2020-06-01 10:55:41 +02:00
Hasan Ramezani c60524c658 Fixed #31546 -- Allowed specifying list of tags in Command.requires_system_checks. 2020-05-21 12:34:54 +02:00
Jon Dufresne d522b51c40 Fixed #31575 -- Added system check for admin sidebar request context processor dependency.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-05-14 11:00:51 +02:00
François Freitag 687cb38a05 Removed unnecessary capturing/hiding of stdout/stderr in various tests. 2020-04-27 08:06:12 +02:00
Jon Dufresne 505fec6bad Capitalized Unicode in docs, strings, and comments. 2020-04-20 12:10:33 +02:00
Mariusz Felisiak 3fb7c12158
Refs #23433 -- Fixed test_django_admin_py.DeprecationTest tests failures on Windows and Python < 3.8.
subprocess.run()'s args parameter accepts a path-like object on Windows
since Python 3.8.
2019-12-10 11:17:50 +01:00
Jon Dufresne 5708327c37 Fixed #23433 -- Deprecated django-admin.py entry point in favor of django-admin.
Unify on the entry point created by setuptools entry_points feature.
2019-12-06 12:11:44 +01:00
Jon Dufresne 8eb0f73eed Refs #23433 -- Removed script argument from AdminScriptTestCase.run_test(). 2019-12-06 10:33:54 +01:00
Jon Dufresne 8aefe11137 Removed unnecessary __init__.py creation in admin_scripts.tests. 2019-12-06 09:57:09 +01:00
Daniel Musketa 3ca9df51c7 Fixed typo in tests/admin_scripts/tests.py. 2019-10-18 07:50:59 +02:00
Carlton Gibson 1de9a92295 Fixed #30872 -- Improved unknown command message when settings are manually configured. 2019-10-15 13:04:32 +02:00
Claude Paroz 9386586f31 Replaced subprocess commands by run() wherever possible. 2019-08-23 10:53:36 +02:00
Aarni Koskela efeceba589
Fixed #30312 -- Relaxed admin check from django.contrib.sessions to SessionMiddleware subclasses. 2019-04-26 11:31:06 +02:00
oliver fc9566d42d Fixed #30393 -- Added validation of startapp's directory option. 2019-04-25 08:52:48 +02:00
oliver 03bee42a7e Made startapp/project's overlaying error message use 'app' or 'project'. 2019-03-30 10:14:07 -04:00
orlnub123 2c0fda7f20 Refs #30057 -- Added more diffsettings tests.
The test in 573f44d62f doesn't act as a
regression test.
2019-02-26 10:30:38 -05:00
Carlton Gibson ed7dee55a9
Fixed admin_scripts test failures on macOS.
Regression in 487d904bf2.
2019-02-14 14:28:19 +01:00
Jon Dufresne 10b0fd1576 Refs #27804 -- Used subTest() in admin_scripts invalid name tests. 2019-02-06 12:59:55 -05:00
Jon Dufresne 487d904bf2 Simplified temporary directory handling in AdminScriptTestCase.
Use tempfile.TemporaryDirectory() in AdminScriptTestCase.setUp()
to create and destroy a temporary directory for each test. It removes
the need for individual tests to delete files.

For test classes that don't use the temporary directory, inherit from
SimpleTestCase.
2019-02-05 12:11:54 -05:00
Jon Dufresne 099c36d546 Replaced manual current directory management with subprocess's cwd argument. 2019-02-05 11:01:36 -05:00
Jon Dufresne 290d8471bb Fixed #30147 -- Simplified directory creation with os.makedirs(..., exist_ok=True). 2019-01-31 12:53:36 -05:00
Tim Graham 7e6b214ed3 Fixed #30116 -- Dropped support for Python 3.5. 2019-01-30 10:19:48 -05:00
Jon Dufresne 7e3bf2662b Removed default mode='r' argument from calls to open(). 2019-01-27 17:41:43 -05:00
Jon Dufresne ce7293bc91 Refs #23919 -- Replaced codecs.open() with open().
On Python 3, open() handles encodings.
2019-01-27 17:39:57 -05:00
orlnub123 573f44d62f Fixed #30057 -- Fixed diffsettings ignoring custom configured settings.
Regression in 49b679371f.
2019-01-12 11:07:03 -05:00
Tim Graham 043bd70942 Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
Hasan Ramezani 5195b99e2c Fixed #29560 -- Added --force-color management command option. 2018-09-11 11:15:42 -04:00
Tim Graham de8eb07c7a Reused a duplicated class in admin_scripts tests. 2018-09-11 10:50:51 -04:00
Rodrigo 371ece2f06 Fixed #29695 -- Added system checks for admin's app dependencies and TEMPLATES setting. 2018-08-20 17:57:46 -04:00
Hasan Ramezani 49b679371f Fixed #29236 -- Fixed diffsettings crash if using settings.configure(). 2018-08-20 12:59:27 -04:00
Tim Graham 5cc81cd9eb Reverted "Fixed #29324 -- Made Settings raise ImproperlyConfigured if SECRET_KEY is accessed and not set."
This reverts commit b3cffde555 due to
a regression and performance concerns.
2018-05-26 21:06:58 -04:00
Jon Dufresne b3cffde555 Fixed #29324 -- Made Settings raise ImproperlyConfigured if SECRET_KEY is accessed and not set. 2018-04-17 13:02:05 -04:00
David Foster c3055242c8 Fixed #29301 -- Made management command --help display command-specific arguments before common arguments. 2018-04-11 13:52:20 -04:00
Tom Forbes 33ac036a6b Fixed #28398 -- Added suggestions for mistyped management commands. 2018-02-21 09:00:49 -05:00
я котик пур-пур ccc25bfe4f Refs #23919 -- Removed obsolete __init__.py files in management command directories. 2018-01-03 11:02:26 -05:00
Claude Paroz 23b21db31b Fixed #28594 -- Removed Jython docs and specific code
Thanks Andrey Martyanov for the reporti, and Tim Graham for the review.
2017-12-23 10:26:32 +01:00
Tim Graham 04d1454350 Moved unnecessary inner imports in admin_scripts tests. 2017-12-20 14:52:20 -05:00
Tim Graham e7b804c060 Fixed #28941 -- Fixed crash in testserver command startup.
Regression in 2b09e4c88e.
2017-12-20 14:38:06 -05:00
geekodour c6864a01b2 Fixed #28791 -- Allowed commands that don't require settings to work if the DJANGO_SETTINGS_MODULE doesn't exist. 2017-12-07 14:19:18 -05:00
Tim Graham 941b0a5b33 Fixed #28708 -- Added constants to detect the Python version. 2017-10-13 10:11:15 -04:00
Tim Graham 6e4c6281db Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Nick Pope ec6481246a Fixed #28524 -- Fixed program name in management commands when using 'python -m django'. 2017-08-31 09:22:25 -04:00
Mads Jensen 550cb3a365 Fixed #27818 -- Replaced try/except/pass with contextlib.suppress(). 2017-06-28 14:07:55 -04:00
Marti Raudsepp fda55c71a8 Fixed #27858 -- Prevented read-only management commands from creating the django_migrations table.
MigrationRecorder now assumes that if the django_migrations table
doesn't exist, then no migrations are applied.

Reverted documentation change from refs #23808.
2017-06-19 13:04:57 -04:00
Adam Johnson b3e55109bd Improved test coverage for startapp/startproject management commands. 2017-05-30 09:40:32 -04:00
Chris Lamb 2f09a28558 Fixed #27881 -- Added diffsettings --output option.
Thanks Haris Ibrahim K. V. for writng docs.
2017-05-27 09:00:06 -04:00
Florian Apolloner 60f5129076 Fixed db backend discovery in admin_scripts tests.
Not all backends have dots in them.
2017-05-10 09:47:20 -04:00
Tim Graham 29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Ed Morley 751d77cdd9 Refs #27537 -- Added default_addr(_ipv6) attributes to runserver command. 2017-01-27 13:30:27 -05:00