Natalia
6f934989df
[5.2.x] Fixed #36158 -- Refactored shell command to improve auto-imported objects reporting.
...
Backport of 56e23b2319cc29e6f8518f8f21f95a530dddb930 from main.
2025-02-13 16:03:09 +01:00
Natalia
16c7dc543c
[5.2.x] Refs #35515 -- Fixed shell command verbose output when auto-importing 0 or 1 object.
...
Co-authored-by: Salvo Polizzi <salvopolizzi03@gmail.com>
Backport of 0597e8ad1e55b565292ead732916aa0e39bdf37b from main.
2025-02-10 22:59:44 -03:00
Natalia
7b0c587a68
[5.2.x] Refs #35515 -- Refactored internal get_and_report_namespace
in the shell command.
...
Backport of 44ccd20375ba0d4da869ef994bc10a2311e9dc88 from main.
2025-02-10 22:59:33 -03:00
Salvo Polizzi
fc28550fe4
Fixed #35515 -- Added automatic model imports to shell management command.
...
Thanks to Bhuvnesh Sharma and Adam Johnson for mentoring this Google
Summer of Code 2024 project. Thanks to Sarah Boyce, David Smith, Jacob
Walls and Natalia Bidart for reviews.
2025-01-09 13:00:29 -03:00
Salvo Polizzi
dfac15d570
Fixed #35517 , Refs #35515 -- Improved test coverage of shell command.
2024-06-27 16:42:55 +02:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Mariusz Felisiak
c5cd878382
Refs #33476 -- Refactored problematic code before reformatting by Black.
...
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
2022-02-03 11:20:46 +01:00
David Smith
fbb1984046
Refs #32956 -- Updated words ending in -wards.
...
AP styleguide: Virtually none of the words ending with -wards end with
an s.
2021-07-30 20:34:50 +02:00
William Schwartz
c0fc5ba380
Fixed #32183 -- Fixed shell crash when passing code with nested scopes.
2020-11-11 09:18:26 +01:00
Mariusz Felisiak
d26d1c196d
Refs #25680 -- Added shell tests for globals available in passed commands.
2020-11-11 09:17:20 +01:00
Claude Paroz
607970f31c
Replaced django.test.utils.patch_logger() with assertLogs().
...
Thanks Tim Graham for the review.
2018-05-07 09:34:00 -04:00
Tim Graham
7aba69145d
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
2017-01-20 08:17:20 -05:00
Peter Inglesby
0b2e5da6ed
Fixed #27721 -- Added interface name to shell's IPython/bython import error.
2017-01-12 13:12:21 -05:00
jpic
bf6392bb75
Fixed #27600 -- Suppressed the REPL during shell's reading from stdin.
...
Thanks Adam Chainz for review and guidance.
2016-12-21 17:05:33 -05:00
Niels Van Och
7f7553dd30
Fixed #25680 -- Added django-admin shell --command option.
...
Add a -c option to the shell command to execute a command passed as a
string as Django.
2016-01-06 18:43:41 -05:00