Commit Graph

148 Commits

Author SHA1 Message Date
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
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz 2366100872 Removed unneeded force_text calls in the test suite 2017-01-24 18:45:54 +01:00
Tim Graham d170c63351 Refs #23919 -- Removed misc references to Python 2. 2017-01-21 20:02:00 -05:00
Tim Graham 7aba69145d Refs #23919 -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Claude Paroz 042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Tim Graham 4e729feaa6 Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Claude Paroz dc8834cad4 Refs #23919 -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Adam Chainz 8669cf0e68 Fixed #27626 -- Moved MEDIA_URL/STATIC_URL validation to a system check. 2016-12-23 10:55:00 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Paweł Marczewski 50f9e736fa Fixed #27438 -- Added the diffsettings --default option. 2016-11-10 07:50:49 -05:00
Tim Graham 8119b679eb Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Tim Graham 16202863fa Refs #27025 -- Fixed tests for the new ModuleNotFoundError in Python 3.6.
http://bugs.python.org/issue15767
2016-09-16 10:24:47 -04:00
Ivan 9a2a52558e Fixed #27171 -- Added unicode_literals and coding preamble to all files in startapp template on Python 2. 2016-09-03 12:00:00 -04:00
Tim Graham 81cdcb66bc Fixed #26791 -- Replaced LiveServerTestCase port ranges with binding to port 0. 2016-06-23 12:04:05 -04:00
Tim Graham 92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Jon Dufresne 4115288b4f Fixed #26315 -- Allowed call_command() to accept a Command object as the first argument. 2016-03-05 13:05:10 -05:00
Jon Dufresne 8d3fcfa39e Cleaned up tests to use call_command() instead of Command.execute(). 2016-03-05 12:59:30 -05:00
Mounir Messelmeni 50931dfa53 Fixed #25304 -- Allowed management commands to check if migrations are applied. 2016-02-12 13:34:56 -05:00
Tim Graham 004ba0f99e Removed unneeded hint=None/obj=None in system check messages. 2016-02-12 13:01:25 -05:00
Chris Lamb abc0777b63 Fixed #25968 -- Changed project/app templates to use a "py-tpl" suffix.
Debian packages unconditionally byte-compile .py files on installation and
do not silence errors by design. Therefore, we need a way of shipping these
invalid .py files without a .py extension but ensuring that when we
template them, they end up as .py.

We don't special-case .py files so that the all the TemplateCommand
command-line options (eg. extra_files and extensions) still work entirely
as expected and it may even be useful for other formats too.
2016-01-25 12:39:06 -05:00
Emre Yilmaz 63a6a653d4 Fixed #25855 -- Enhanced the migration warning for runserver.
Added unapplied migration count and the list of unmigrated apps.
2015-12-21 12:54:29 -05:00
Tim Graham 10427646b8 Fixed #25909 -- Added unicode_literals import to apps.py generated by startapp. 2015-12-12 09:34:01 -05:00
Tim Graham 89359347c4 Refs #25589 -- Fixed admin_scripts test failure on Windows.
Traceback (most recent call last):
  File "tests\admin_scripts\tests.py", line 646, in test_startapp_unicode_name
    content = f.read()
  File "lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 46: character maps to <undefined>
2015-10-22 19:38:23 -04:00
Yoong Kang Lim 3f300efede Fixed #25589 -- Allowed startapp/project to create apps with Unicode characters in the name. 2015-10-22 13:01:07 -04:00