1
0
mirror of https://github.com/django/django.git synced 2025-07-12 05:39:11 +00:00

171 Commits

Author SHA1 Message Date
David Smith
e565a5cd18 [4.0.x] Refs #33476 -- Applied Black's 2023 stable style.
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.

https://github.com/psf/black/releases/tag/23.1.0

Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main.
2023-02-01 11:52:33 +01:00
Mariusz Felisiak
3278c31fa5 [4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
2022-02-08 19:25:02 +01:00
django-bot
6a682b38e7 [4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
2022-02-08 12:15:38 +01:00
sage
84c7c4a477 Fixed #32309 -- Added --exclude option to startapp/startproject management commands. 2021-09-01 12:08:02 +02:00
sage
3686077d46 Refs #32309 -- Added test for excluding hidden directories in startproject command. 2021-09-01 11:05:10 +02:00
Jan Szoja
b667ac24ea Fixed #25264 -- Allowed suppressing base command options in --help output.
This also suppresses -verbosity and --trackback options in the
runserver's help.
2021-08-31 11:04:02 +02:00
Jan Szoja
97f377cd35 Refs #25264 -- Added test for command --help output with default options and custom arguments. 2021-08-31 11:03:58 +02:00
Mariusz Felisiak
7e51893911
Refs #32379 -- Added USE_TZ settings to AdminScriptTestCase.write_settings(). 2021-05-25 13:22:40 +02:00
Rohith PR
530f58caaa Fixed #32734 -- Fixed validation of startapp's directory with trailing slash.
Regression in fc9566d42daf28cdaa25a5db1b5ade253ceb064f.
2021-05-14 12:45:00 +02:00
Hasan Ramezani
34aa4f1997 Fixed #32296 -- Added --skip-checks option to runserver command. 2021-01-18 12:51:35 +01:00
Mariusz Felisiak
90c59b4e12 Refs #23433 -- Removed django-admin.py entry point per deprecation timeline. 2021-01-14 17:50:04 +01:00
Tom Forbes
b5e12d490a Fixed #31007 -- Allowed specifying type of auto-created primary keys.
This also changes the default type of auto-created primary keys
for new apps and projects to BigAutoField.
2020-12-15 11:25:46 +01:00
William Schwartz
cc22693505 Fixed #32177 -- Made execute_from_command_line() use program name from the argv argument.
This caused crash in environments where sys.argv[0] is incorrectly set
to None.
2020-11-10 08:16:53 +01:00
Mariusz Felisiak
75d7af43c1
Corrected docstring quotes in various code. 2020-09-22 10:30:53 +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
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 573f44d62fe1e87e2c20a74eba5e20ca9ff0ed85 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 487d904bf253de2f5633f181a168f94086bcd6cb.
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 49b679371fe9beddcd23a93b5fdbadea914f37f8.
2019-01-12 11:07:03 -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 b3cffde5559c4fa97625512d7ec41a674be26076 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
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 2b09e4c88e96cb03b29f5a6b0e4838ab4271e631.
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