Commit Graph

2901 Commits

Author SHA1 Message Date
orlnub123 573f44d62f Fixed #30057 -- Fixed diffsettings ignoring custom configured settings.
Regression in 49b679371f.
2019-01-12 11:07:03 -05:00
Denis Stebunov 277de22984 Fixed #30058 -- Made SMTP EmailBackend.send_messages() return 0 for empty/error cases. 2018-12-26 13:33:08 -05:00
Sanyam Khurana 5d25804eaf Fixed #20098 -- Added a check for model Meta.db_table collisions. 2018-12-24 10:40:11 -05:00
Carlton Gibson bbe28fa076 Refs #30015 -- Added 2.1.5 release note and removed 'we' in comments. 2018-12-20 21:30:13 -05:00
Dakota Hawkins 8d3147e130 Fixed #30031 -- Added --no-header option to makemigrations/squashmigrations. 2018-12-19 12:41:31 +01:00
Konstantin Alekseev b514dc14f4 Fixed #30015 -- Ensured request body is properly consumed for keep-alive connections. 2018-12-19 11:27:08 +01:00
dmytryi.striletskyi dcd1025f4c Fixed #28385 -- Fixed deserializing natural keys when primary key has a default value.
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2018-11-27 18:35:19 -05:00
Mariusz Felisiak d5f4ce9849
Fixed #29949 -- Refactored db introspection identifier converters.
Removed DatabaseIntrospection.table_name_converter()/column_name_converter()
and use instead DatabaseIntrospection.identifier_converter().

Removed DatabaseFeatures.uppercases_column_names.

Thanks Tim Graham for the initial patch and review and Simon Charette
for the review.
2018-11-21 09:06:50 +01:00
Tim Graham bff5ccff75 Refs #24829 -- Removed TemplateResponse rendering in BaseHandler.get_response().
Obsolete since 742ea51413.
2018-11-20 11:04:44 -05:00
Tim Graham 3529d0eabf Corrected docs and removed unused code for got_request_exception signal's sender argument.
Inaccurate since 7d1b69dbe7.
2018-11-20 10:15:58 -05:00
Tim Graham cafb34963c Removed BaseHandler.get_exception_response().
Unused since 7d1b69dbe7.
2018-11-20 09:45:29 -05:00
Nick Pope ebd270627c Refs #29722 -- Added introspection of partitions for PostgreSQL. 2018-11-19 14:06:01 -05:00
Sarah Guermond cd40306854 Fixed #25884 -- Fixed migrate --run-syncdb when specifying an app label. 2018-11-14 18:22:59 -05:00
Florian Apolloner 934acf1126 Fixed keep-alive support in manage.py runserver.
Ticket #25619 changed the default protocol to HTTP/1.1 but did not
properly implement keep-alive. As a "fix" keep-alive was disabled in
ticket #28440 to prevent clients from hanging (they expect the server to
send more data if the connection is not closed and there is no content
length set).

The combination of those two fixes resulted in yet another problem:
HTTP/1.1 by default allows a client to assume that keep-alive is
supported unless the server disables it via 'Connection: close' -- see
RFC2616 8.1.2.1 for details on persistent connection negotiation. Now if
the client receives a response from Django without 'Connection: close'
and immediately sends a new request (on the same tcp connection) before
our server closes the tcp connection, it will error out at some point
because the connection does get closed a few milli seconds later.

This patch fixes the mentioned issues by always sending 'Connection:
close' if we cannot determine a content length. The code is inefficient
in the sense that it does not allow for persistent connections when
chunked responses are used, but that should not really cause any
problems (Django does not generate those) and it only affects the
development server anyways.

Refs #25619, #28440.
2018-11-10 13:54:45 +01:00
minusf 545dae24fd Fixed signing.dumps() example for Python 3. 2018-11-09 07:26:46 -05:00
Tim Graham 98ef3829e9 Fixed #29890 -- Fixed FileSystemStorage crash if concurrent saves try to create the same directory.
Regression in 632c4ffd9c.
2018-10-31 19:28:11 -04:00
Junyoung df448bfd02 Fixed #29783 -- Added app label validation to showmigrations command. 2018-10-30 19:29:00 -04:00
Artur Juraszek 817c6cdf0e Capitalized SecurityMiddleware headers for consistency with other headers.
(No behavior change since HTTP headers are case insensitive.)
2018-10-30 18:30:51 -04:00
Prabakaran Kumaresshan 10d82c85aa Fixed #29831 -- Added validation for makemigrations --name. 2018-10-23 10:05:24 -04:00
jannschu efc0f77f02 Fixed #29830 -- Fixed loss of custom utf-8 body encoding in mails. 2018-10-22 15:21:33 -04:00
buzzi 24cae0bedc Fixed #29860 -- Allowed BaseValidator to accept a callable limit_value. 2018-10-22 10:26:54 -04:00
Adam Allred 4e78e389b1 Fixed #29774 -- Fixed django-admin shell hang on startup.
sys.stdin.read() blocks waiting for EOF in shell.py which will
likely never come if the user provides input on stdin via the
keyboard before the shell starts. Added check for a tty to
skip reading stdin if it's not present.

This still allows piping of code into the shell (which should
have no TTY and should have an EOF) but also doesn't cause it
to hang if multi-line input is provided.
2018-10-19 20:00:12 -04:00
Tim Graham 4268d275b8 Fixed #29857 -- Added get_storage_class to django.core.files.storage.__all__. 2018-10-17 09:03:51 -04:00
Jon Dufresne e90af8bad4 Capitalized "Python" in docs and comments. 2018-10-09 09:26:07 -04:00
Jon Dufresne 1e87c9fe71 Replaced kwargs.pop() with keyword-only arguments. 2018-10-08 15:06:02 -04:00
Sergey Fedoseev 8ef8bc0f64 Refs #28909 -- Simplifed code using unpacking generalizations. 2018-09-28 09:57:12 -04:00
Matthew Power 18098d261f Fixed #29673 -- Reset the URLconf at the end of each request.
Co-authored-by: Ross Thorne <rmwthorne@googlemail.com>
2018-09-26 15:35:24 -04:00
Sergey Fedoseev 91841c77cd Fixed loaddata error message when uncompressed fixture has a dot in its name. 2018-09-26 15:30:15 -04:00
Jon Dufresne 82f286cf6f Refs #29784 -- Switched to https:// links where available. 2018-09-26 08:48:47 +02:00
Sergey Fedoseev 553c24018e Removed unneeded list() calls in list.extend() argument. 2018-09-25 11:30:43 -04:00
Tim Graham 495abe0095 Refs #29198 -- Fixed migrate --plan crash if RunSQL uses a list or tuple.
Also fixed test failures if sqlparse isn't installed.
2018-09-19 17:13:39 -04:00
Nick Pope a4d8e412e0 Refs #29560 -- Fixed typo in django/core/management/base.py. 2018-09-11 12:47:17 -04:00
Hasan Ramezani 5195b99e2c Fixed #29560 -- Added --force-color management command option. 2018-09-11 11:15:42 -04:00
Nick Pope 570402ffd7 Refs #29713 -- Improved error message from translation system check. 2018-09-06 13:49:25 +02:00
David 5db8d617c0 Fixed #29713 -- Added check that LANGUAGE_CODE uses standard language id format. 2018-09-03 10:43:55 +02:00
Nick Pope ed4bfacb3c Fixed #29703 -- Deprecated QuerySetPaginator alias.
Unused since 4406d283e1.
2018-08-27 16:23:43 -04:00
Matthijs Kooijman 08f360355a Fixed #29704 -- Fixed manage.py test --testrunner if it isn't followed by an equals sign. 2018-08-23 10:12:03 -04:00
winkidney c69d40f943 Fixed #29705 -- Fixed ImageField RuntimeError crash for WebP files. 2018-08-23 09:04:25 -04:00
Claude Paroz 50b8493581 Refs #29654 -- Replaced three dots with ellipsis character in output strings. 2018-08-22 09:13:58 -04:00
Federico Bond a0ca4b5694 Fixed #29689 -- Improved performance of FileSystemStorage.listdir() and FilePathField with os.scandir(). 2018-08-20 17:58:00 -04:00
Hasan Ramezani 49b679371f Fixed #29236 -- Fixed diffsettings crash if using settings.configure(). 2018-08-20 12:59:27 -04:00
oliver abd0ad7681 Fixed #29626, #29584 -- Added optimized versions of get_many() and delete_many() for the db cache backend. 2018-08-17 15:13:09 -04:00
Josh Schneier 3767c7ff39 Fixed #29244 -- Prevented Paginator.count() from silencing TypeError and AttributeError. 2018-08-07 17:41:18 -04:00
Calvin DeBoer 058d33f3ed Fixed #29198 -- Added migrate --plan option. 2018-08-03 15:22:42 -04:00
luz.paz 97e637a87f Fixed typos in comments and docs. 2018-08-01 16:09:22 -04:00
Thomas Grainger 69eb70456b Fixed typo in ContentFile docstring. 2018-07-27 10:58:08 -04:00
Tim Bell cdcf4164be Fixed #29528 -- Made URLValidator reject invalid characters in the username and password. 2018-07-23 10:30:01 -04:00
Tim Graham 1564195010
Improved inspectdb readability with namedtuple attributes. 2018-07-20 19:58:16 -04:00
Tim Graham 45808895c0 Refs #23919 -- Removed obsolete u-prefix stripping in inspectdb. 2018-07-20 18:23:30 -04:00
Mariusz Felisiak a73cf8110e Removed duplicate words in various comments. 2018-07-18 11:54:15 -04:00
Peter Inglesby 312eb5cb11 Fixed #26291 -- Allowed loaddata to handle forward references in natural_key fixtures. 2018-07-13 17:54:47 -04:00
Simon Charette 37835883ad Fixed #29550 -- Eased overriding pickle.dumps() protocol in cache backends and session serializer. 2018-07-09 11:46:55 -04:00
Simon Charette 2d75509bcb Refs #27480 -- Moved FileBasedCache content writing logic to a method. 2018-07-09 11:46:03 -04:00
Christian Barcenas c9c6c16650 Fixed #20584 -- Fixed memcached's get_many() with single-use iterators.
Thanks Guyon Morée for the report.
2018-07-09 10:24:41 -04:00
Claude Paroz eac9ab7ebb Removed parser.add_arguments() arguments that match the defaults. 2018-07-02 17:54:57 -04:00
Jon Prindiville b4cba4ed62 Fixed #28144 -- Added FileSystemStorage.OS_OPEN_FLAGS to allow customization. 2018-06-29 15:51:59 -04:00
Tim Graham 2ec151e35d Fixed #29514 -- Reverted "Used datetime.timezone.utc instead of pytz.utc for better performance."
This reverts commit 27ca5ce19f due to a
regression.
2018-06-28 11:14:26 -04:00
oliver 6b3e17bab6 Fixed #29518 -- Added validation for sqlmigrate's app_label argument. 2018-06-25 10:43:12 -04:00
Claude Paroz fc26615164 Refs #29506 -- Added validation for squashmigrations' app_label option. 2018-06-20 15:46:43 -04:00
Claude Paroz c723a1ff8e Fixed #29506 -- Added validation for migrate's app_label option.
Thanks MyungSeKyo for the report and the initial patch.
2018-06-20 15:42:40 -04:00
Claude Paroz c3c7d15c34 Refs #29469 -- Reused get_app_config() error message in makemigrations error. 2018-06-20 15:41:51 -04:00
humbertotm e95008f241 Fixed #29152 -- Allowed passing kwargs to ArgumentParser initialization in management commands. 2018-06-16 15:54:59 -04:00
oliver 78972af367 Fixed #29469 -- Added a helpful makemigrations error if app_label contains dots. 2018-06-16 15:18:57 -04:00
Claude Paroz 998d774195 Fixed #29492 -- Improved compilemessages speed 2018-06-16 11:52:02 +02:00
Claude Paroz a77f21880d Fixed #24384 -- Allowed compilemessages to continue running after nonfatal errors.
Thanks Aymeric Augustin for the report and Carlton Gibson and Tim Graham for
the reviews.
2018-06-13 21:09:02 +02:00
Bartosz Grabski 2bc014750a Fixed #29452 -- Fixed makemessages setting charset of .pot files. 2018-06-11 21:34:13 -04:00
Josh Schneier 98e8c0293b Removed unused HttpRequest._post_parse_error attribute.
Unused since 8f8c54f70b.
2018-06-07 18:51:33 -04:00
Claude Paroz ce3351b950 Fixed #29301 -- Added custom help formatter to BaseCommand class
This partially reverts c3055242c8.
Thanks Adam Johnson and Carlton Gibson for the reviews.
2018-06-06 19:16:10 +02:00
Wang Dongxiao 0914a2003b Added 'caches' to django.core.cache.__all__. 2018-05-28 09:14:46 -04:00
Daniel Hepper 4e016d1372 Removed obsolete BaseHandler attributes.
Unused since d334f46b7a.
2018-05-27 11:21:27 -04:00
Ryan P Kilby 2dcc5d629a Fixed #29392 -- Disallowed use of abbreviated forms of --settings and --pythonpath management command options. 2018-05-14 22:18:22 -04:00
Claude Paroz d65b0f72de Fixed #17379 -- Removed management commands deactivation of the locale. 2018-05-13 10:21:53 +02:00
Nicolas Noé c629d4e956 Fixed #29389 -- Made Paginator reject non-integer page numbers of type float. 2018-05-09 09:28:52 -04:00
Samir Shah 10b44e4525 Fixed #26688 -- Fixed HTTP request logging inconsistencies.
* Added logging of 500 responses for instantiated responses.
* Added logging of all 4xx and 5xx responses.
2018-05-04 20:55:03 -04:00
Nicolas Noé 3246ad1065 Fixed #27480 -- Added cache.touch(). 2018-04-27 17:48:35 -04:00
Hasan Ramezani dd68b51e1d Fixed #29295 -- Fixed management command crash when using subparsers.
Thanks Tim Graham for the fix.
2018-04-21 17:33:17 -04:00
Tom 11b8c30b9e Ref #23919 -- Replaced some os.path usage with pathlib.Path. 2018-04-19 21:30:00 -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
desigrammer d31a248c64 Removed unused regexes in django.core.management.templates.
Unused since their introduction in a9a0f0b03f.
2018-04-02 07:32:24 -04:00
Michael Sinov 9aca67bea8 Fixed #27533 -- Fixed inspectdb crash if a unique constraint uses an unsupported type. 2018-03-21 12:28:16 -04:00
Tim Graham a170dac887 Fixed too many parentheses in inspectdb Meta.unique_together output.
Regression in c76d87427d.
2018-03-21 10:39:36 -04:00
Tim Graham c76d87427d
Refs #23919 -- Removed obsolete comments about u'' prefixes. 2018-03-21 08:15:07 -04:00
Sergey Fedoseev 27ca5ce19f Used datetime.timezone.utc instead of pytz.utc for better performance. 2018-03-20 15:24:16 -04:00
Tim Graham 6421bd702f Refs #29227 -- Made inspectdb generate BooleanField(null=True) rather than NullBooleanField. 2018-03-20 12:10:10 -04:00
Peter Inglesby 73f7d1755f Extracted deserialize fk/m2m functions from Deserializer.
In preparation for handling forward references (refs #26291).
2018-03-20 12:07:39 -04:00
Mariusz Felisiak 362813d628
Fixed hanging indentation in various code. 2018-03-16 10:54:34 +01:00
Hajime Nakagami 8f75984c26 Quoted field names in cache db backend SQL.
On Firebird, 'value' is a reserved word and must be quoted.
2018-03-13 22:46:41 -04:00
Sergey Fedoseev e17776e2cd Removed redundant UploadedFile.DEFAULT_CHUNK_SIZE.
The same value is inherited from File.
2018-03-12 09:12:44 -04:00
Sergey Fedoseev a5406fe989 Used cached_property for File.size. 2018-03-10 17:21:39 +05:00
Alex Stovbur 2d9ec4d735 Fixed #29188 -- Fixed ContentFile.size after a write(). 2018-03-08 14:07:29 -05:00
Alex Tomic a1a3e51561 Fixed #29133 -- Fixed call_command() crash if a required option is passed in options. 2018-03-02 12:25:08 -05:00
Mariusz Felisiak 61596f40ad Removed unnecessary setdefault() from CheckRegistry.register(). 2018-02-26 08:54:55 -05:00
Tom Forbes 33ac036a6b Fixed #28398 -- Added suggestions for mistyped management commands. 2018-02-21 09:00:49 -05:00
Williams Mendez 2691ed7ba1 Fixed #29140 -- Fixed EmailMessage crash when body is None. 2018-02-20 09:34:01 -05:00
Denys Duchier cb7860cced Fixed #24607 -- Serialized natural keys in multi-table inheritance models.
Thanks João Paulo Melo de Sampaio for the test.
2018-02-12 21:15:04 -05:00
Asif Saifuddin Auvi b38532cd6b Refs #27795 -- Replaced force_bytes() usage in django.core.signing. 2018-02-07 12:47:34 -05:00
Raymond Hettinger aba9763b51 Refs #28814 -- Imported from collections.abc to fix Python 3.7 deprecation warnings.
https://bugs.python.org/issue25988
2018-02-05 11:42:47 -05:00
Tim Graham d0a42a14c0 Fixed imports per isort 4.3.1.
Partially reverted 9bcf73d788.
2018-02-02 14:44:07 -05:00
Jon Dufresne 6a039800db Refs #27795 -- Replaced force_bytes() usage in django.core.cache. 2018-02-02 08:57:58 +01:00
Mariusz Felisiak 9bcf73d788 Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00