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
Simon Charette
5e3463f6bc
Fixed #27595 -- Made ForeignKey.get_col() follow target chains.
...
Previously, foreign relationships were followed only one level deep which
prevents foreign keys to foreign keys from being resolved appropriately.
This was causing issues such as improper database value conversion for
UUIDField on SQLite because the resolved expression's output field's
internal type wasn't correct. Added tests to make sure unlikely foreign
reference cycles don't cause recursion errors.
Refs #24343 .
Thanks oyooyo for the report and Wayne Merry for the investigation.
2018-10-22 09:49:34 -04:00
Florian Apolloner
c53af56613
Fixed #29847 -- Ensured proper ordering in queries.
...
Even though good databases tend to keep the result sorted by the/one
window expression and the planners are smart enough to not resort if not
required, it is not valid to rely on this.
MariaDB specifically did return whatever order it wanted, which is
completely okay. Now we sort towards the expected data for all databases.
2018-10-21 22:05:06 +02:00
Florian Apolloner
e127ef62de
Fixed a failing test when the source directory is on a readonly fs.
2018-10-21 19:37:58 +02:00
Mariusz Felisiak
328f5627dd
Fixed #29870 -- Added DurationField introspection for Oracle and PostgreSQL.
...
Thanks Tim Graham for the review.
2018-10-21 09:08:05 +02:00
aspalding
dc5e75d419
Fixed #29838 -- Fixed crash when combining Q objects with __in lookups and lists.
...
Regression in fc6528b25a
.
2018-10-17 11:34:49 -04:00
aspalding
217f82d713
Refs #29838 -- Fixed make_hashable() for values that have lists or dicts nested in tuples.
...
And for non-hashable values that are iterable, e.g. sets.
2018-10-17 11:17:50 -04:00
aspalding
834c4ec8e4
Moved make_hashable() to django.utils and added tests.
2018-10-17 11:17:23 -04:00
Florian Apolloner
bc7dd8490b
Fixed #21171 -- Avoided starting a transaction when a single (or atomic queries) are executed.
...
Checked the following locations:
* Model.save(): If there are parents involved, take the safe way and use
transactions since this should be an all or nothing operation.
If the model has no parents:
* Signals are executed before and after the previous existing
transaction -- they were never been part of the transaction.
* if `force_insert` is set then only one query is executed -> atomic
by definition and no transaction needed.
* same applies to `force_update`.
* If a primary key is set and no `force_*` is set Django will try an
UPDATE and if that returns zero rows it tries an INSERT. The first
case is completly save (single query). In the second case a
transaction should not produce different results since the update
query is basically a no-op then (might miss something though).
* QuerySet.update(): no signals issued, single query -> no transaction
needed.
* Model/Collector.delete(): This one is fun due to the fact that is
does many things at once.
Most importantly though: It does send signals as part of the
transaction, so for maximum backwards compatibility we need to be
conservative.
To ensure maximum compatibility the transaction here is removed only
if the following holds true:
* A single instance is being deleted.
* There are no signal handlers attached to that instance.
* There are no deletions/updates to cascade.
* There are no parents which also need deletion.
2018-10-17 12:19:02 +02:00
Mads Jensen
1c0bf95ff6
Refs #23919 -- Removed a stray object-inheritance.
...
Follow up to 081e787160
.
2018-10-16 09:58:53 -04:00
Jon Dufresne
0cd465b63a
Fixed #29817 -- Deprecated settings.FILE_CHARSET.
2018-10-15 17:15:41 -04:00
Jon Dufresne
99d4fc18bd
Refs #27829 -- Added warning for settings.DEFAULT_CONTENT_TYPE usage outside of Django.
2018-10-15 16:31:39 -04:00
oliver
1299421cad
Fixed #29725 -- Removed unnecessary join in QuerySet.count() and exists() on a many-to-many relation.
2018-10-15 11:01:57 -04:00
Mariusz Felisiak
f2e2a1bd4b
Fixed #29845 -- Fixed Cast crash on MySQL when casting to DecimalField.
2018-10-15 15:57:22 +02:00
Tim Graham
70a80ff1be
Added a urlize test for wrapping characters.
2018-10-12 08:13:52 +02:00
Patrik Sletmo
adfdb9f169
Fixed #29814 -- Added support for NoneType serialization in migrations.
2018-10-11 09:02:14 -04:00
Mariusz Felisiak
52fec5d18f
Fixed #29836 -- Bumped required cx_Oracle to 6.0.
2018-10-11 11:43:16 +02:00
Jon Dufresne
c82893cb8c
Refs #27795 -- Removed force_bytes() usage from django/utils/http.py.
...
django.utils.http.urlsafe_base64_encode() now returns a string, not a
bytestring. Since URLs are represented as strings,
urlsafe_base64_encode() should return a string. All uses immediately
decoded the bytestring to a string anyway.
As the inverse operation, urlsafe_base64_decode() accepts a string.
2018-10-10 14:38:22 -04:00
Hasan Ramezani
b5d7604cb0
Completed FixedOffset test coverage.
2018-10-09 20:32:08 -04:00
Jon Dufresne
e90af8bad4
Capitalized "Python" in docs and comments.
2018-10-09 09:26:07 -04:00
Jon Dufresne
31c0348687
Fixed postgres_tests.test_signals.OIDTests when run in isolation.
2018-10-09 09:23:36 -04:00
Eric Brandwein
b0b4aac555
Fixed #29775 -- Fixed URL converters in a nested namespaced path.
...
When using include() without namespaces of some urlpatterns that
have an include() with namespace, the converters of the parent
include() weren't being used to convert the arguments of reverse().
2018-10-04 11:42:27 -04:00
Jon Dufresne
5a23a285de
Used skip(If|Unless)DBFeature in transactions tests.
2018-10-04 10:09:06 -04:00
Jon Dufresne
9f6d0c11eb
Removed Jinja2 dependency from admin_checks tests.
2018-10-04 16:05:22 +02:00
Jon Dufresne
9b508bdb9b
Removed unnecessary skipUnless in HTTPSitemapTests.
...
contrib.sites is included in INSTALLED_APPS by SitemapTestsBase.
2018-10-04 08:50:18 -04:00
Jon Dufresne
bdae19cf63
Refs #27795 -- Removed force_bytes() usage in sessions.
...
SessionBase.decode() is the inverse operation to SessionBase.encode().
As SessionBase.encode() always returns a string, SessionBase.decode()
should always be passed a string argument. Fixed the file backend, which
was the only backend still passing a bytestring.
2018-10-03 11:11:42 +02:00
Stefano Chiodino
6de7f9ec60
Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField.
2018-10-02 19:17:23 -04:00
Simon Charette
bc7e288ca9
Fixed #29745 -- Based Expression equality on detailed initialization signature.
...
The old implementation considered objects initialized with an equivalent
signature different if some arguments were provided positionally instead of
as keyword arguments.
Refs #11964 , #26167 .
2018-10-02 19:15:20 -04:00
Nick Pope
bf8b625a3b
Refs #29722 -- Added introspection of materialized views for PostgreSQL.
2018-10-02 14:02:04 -04:00
Nick Pope
45ef3df7d0
Fixed #29719 -- Added introspection of foreign tables for PostgreSQL.
...
Thanks infinite-l00p for the initial patch.
2018-10-02 14:01:24 -04:00
Simon Charette
24dc7d8940
Refs #29641 -- Extracted reusable CheckConstraint logic into a base class.
2018-10-02 13:11:18 -04:00
Simon Charette
9142bebff2
Refs #11964 -- Changed CheckConstraint() signature to use keyword-only arguments.
...
Also renamed the `constraint` argument to `check` to better represent which
part of the constraint the provided `Q` object represents.
2018-10-02 10:53:04 -04:00
Przemysław Buczkowski
70d0a1ca02
Fixed #29711 -- Added a system check for uniquness of admin actions' __name__.
2018-10-02 09:17:23 -04:00
Jon Dufresne
7598cd4748
Fixed #29813 -- Fixed DatabaseOperation test when run in isolation on MySQL.
2018-10-02 08:22:38 -04:00
Abhinav Patil
bf01994a5c
Fixed #29804 -- Added 'did you mean' suggestions for unsupported lookup error.
2018-10-01 19:03:10 -04:00
Jon Dufresne
b3b47bf515
Added tests for using bytearray with BinaryField and corrected docs.
2018-10-01 09:16:16 -04:00
Claude Paroz
fc3a463048
Fixed #29767 -- Made date-related casts work on SQLite
...
Thanks Rémy Hubscher for the report and Tim Graham and Simon Charette for the reviews.
2018-10-01 13:27:30 +02:00
Tim Graham
a7284cc0c3
Fixed #29809 -- Fixed a crash when a "view only" user POSTs to the admin user change form.
2018-10-01 10:09:50 +02:00
Carlton Gibson
bf39978a53
Fixed CVE-2018-16984 -- Fixed password hash disclosure to admin "view only" users.
...
Thanks Claude Paroz & Tim Graham for collaborating on the patch.
2018-10-01 10:05:01 +02:00
Claude Paroz
ddcb9e8062
Refs #21408 -- Updated naturaltime translation test.
...
Upcoming German translations will not differ for past and future naturaltime
translations. Using Czech language instead.
2018-09-29 15:06:11 +02:00
Sergey Fedoseev
8ef8bc0f64
Refs #28909 -- Simplifed code using unpacking generalizations.
2018-09-28 09:57:12 -04:00
Tim Graham
4fc8fb7dda
Tested showmigrations with apps without migrations.
2018-09-28 09:56:40 -04:00
Paweł Kołodziej
05c578bc1f
Fixed #29796 -- Added system check for STATICFILES_DIRS prefix ending with a slash.
2018-09-27 19:49:37 -04:00
Marten Kenbeek
40c8ffad72
Fixed #29768 -- Improved error message when an AppConfig has a typo in INSTALLED_APPS.
2018-09-26 16:12:21 -04:00
Ramon Saraiva
2349cbd909
Fixed #29782 -- Added better error message when filtering queryset with AnonymousUser.
2018-09-26 15:36:19 -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
fb2964a410
Added test of filtering on BinaryField and corrected docs.
2018-09-26 14:38:12 -04:00
Mariusz Felisiak
024abe5b82
Fixed #29630 -- Fixed crash of sliced queries with multiple columns with the same name on Oracle 12.1.
...
Regression in 0899d583bd
.
Thanks Tim Graham for the review and Jani Tiainen for help.
2018-09-26 20:18:48 +02:00
Jon Dufresne
82f286cf6f
Refs #29784 -- Switched to https:// links where available.
2018-09-26 08:48:47 +02:00
Oleg
d1d5c97bc2
Fixed #29778 -- Fixed quoting of unique index names.
...
Regression in 3b429c9673
.
2018-09-25 16:00:20 -04:00
Alexey
8624459586
Added a test for password_changed() with a custom validator.
2018-09-25 11:58:05 -04:00
Jon Dufresne
bb81c22d90
Refs #27795 -- Removed force_bytes() usage in utils/_os.py.
2018-09-25 11:27:36 -04:00
Ian Foote
9a0e0d966a
Refs #11964 -- Renamed a database check constraint test.
2018-09-25 11:14:45 -04:00
Sergey Fedoseev
747db4018b
Simplified AdminFieldExtractionMixin.get_admin_form_fields().
2018-09-25 11:06:41 -04:00
Jon Dufresne
8c3e0eb1c1
Normalized spelling of "lowercase" and "lowercased".
2018-09-25 10:30:18 -04:00
Jon Dufresne
ad9a28ee38
Refs #29784 -- Normalized Python docs links to omit the version.
2018-09-25 10:19:42 +02: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
Javier Buzzi
a0d63b02c3
Fixed #29772 -- Made LazyObject proxy __lt__() and __gt__().
2018-09-19 13:51:01 -04:00
Tom Forbes
9cbdb44014
Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models.
2018-09-18 16:14:44 -04:00
Mariusz Felisiak
7b159df942
Fixed expressions tests when run in reverse.
...
Regression in e7a0a5c8b2
.
2018-09-18 15:58:20 -04:00
Claude Paroz
f5e347a640
Fixed #27899 -- Added support for phrase/raw searching in SearchQuery.
...
Thanks Tim Graham, Nick Pope, and Claude Paroz for contribution and review.
2018-09-17 12:03:52 -04:00
Sergey Fedoseev
c5e450ac95
Fixed #29761 -- Confirmed support for PROJ 5.x.
2018-09-17 12:03:30 -04:00
Adam Johnson
245c36d7b6
Fixed #29642 -- Added check for arguments of custom error handler views.
2018-09-14 11:59:56 -04:00
Simon Charette
a4495f4b98
Fixed #29755 -- Made migrations detect changes to Meta.default_related_name.
2018-09-14 09:09:17 -04:00
Mariusz Felisiak
e7a0a5c8b2
Simplified expressions.tests.
2018-09-13 22:12:21 +02:00
Ramiro Morales
1b1f64ee5a
Refs #14357 -- Deprecated Meta.ordering affecting GROUP BY queries.
...
Thanks Ramiro Morales for contributing to the patch.
2018-09-13 12:29:48 -04:00
Tim Graham
32fbccab40
Fixed #29749 -- Made the migrations loader ignore files starting with a tilde or underscore.
...
Regression in 29150d5da8
.
2018-09-11 12:51:11 -04:00
Tom Carrick
a43cfc23d4
Fixed #29746 -- Fixed misleading FlatpageForm URL help text if APPEND_SLASH is disabled.
2018-09-11 12:15:22 -04: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
Srinivas Reddy Thatiparthy
34d6bceec4
Fixed #29500 -- Fixed SQLite function crashes on null values.
...
Co-authored-by: Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2018-09-10 15:08:55 -04:00
Krzysztof Gogolewski
db926a0048
Fixed #29243 -- Improved efficiency of migration graph algorithm.
2018-09-10 09:57:31 -04:00
Michal Čihař
22e8ab0286
Fixed #29728 -- Prevented session resaving if CSRF cookie is unchanged.
2018-09-08 11:46:13 -04:00
Alexander Holmbäck
f315d0423a
Fixed #29727 -- Made nonexistent joins in F() raise FieldError.
...
Regression in 2162f0983d
.
2018-09-08 09:40:33 -04:00
Alexander Holmbäck
aa16ec5474
Moved test for nonexistent field in F() to BasicExpressionsTest.
2018-09-08 09:21:57 -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
James Aylett
ee52044a27
Refs #16470 -- Fixed typo in a FileResponse test.
2018-09-01 15:14:18 +02:00
Tim Graham
fd8a7a5313
Fixed #29723 -- Fixed crash if InlineModelAdmin.has_add_permission() doesn't accept the obj argument.
...
* Refs #27991 -- Added testing for ModelAdmin.get_inline_instances() if the inline's has_add_permission() doesn't accept 'obj'.
* Fixed #29723 -- Fixed crash if InlineModelAdmin.has_add_permission() doesn't accept the obj argument.
2018-08-30 11:22:50 +02:00
Mariusz Felisiak
39461a83c3
Fixed #29694 -- Fixed column mismatch crash with QuerySet.values() or values_list() after combining querysets with extra() with union(), difference(), or intersection().
...
Regression in 0b66c3b442
.
2018-08-29 10:00:15 +02:00
Nick Pope
ed4bfacb3c
Fixed #29703 -- Deprecated QuerySetPaginator alias.
...
Unused since 4406d283e1
.
2018-08-27 16:23:43 -04:00
Dan Palmer
e181666973
Fixed #29687 -- Allowed the test client to serialize list/tuple as JSON.
2018-08-25 10:57:05 -04:00
priyanshsaxena
83b04d4f88
Fixed #29048 -- Added **extra_context to database function as_vendor() methods.
2018-08-23 11:52:09 -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
Matthijs Kooijman
69071e7f51
Added manage.py test --testrunner tests.
2018-08-23 10:12:03 -04:00
Alejandro Dubrovsky
108c04f572
Fixed #29570 -- Added check that MEDIA_URL isn't in STATIC_URL.
2018-08-23 10:10:39 -04:00
winkidney
c69d40f943
Fixed #29705 -- Fixed ImageField RuntimeError crash for WebP files.
2018-08-23 09:04:25 -04:00
Simon Willison
586a9dc429
Fixed #26352 -- Made system check allow ManyToManyField to target the same model if through_fields differs.
2018-08-22 12:07:29 -04:00
Tim Graham
f2d5dafec9
Removed invalid Meta.ordering in a test model.
...
It never worked and was never used.
2018-08-22 10:05:12 -04:00
Franck Michea
7def8bed58
Fixed #29698 -- Fixed Field._check_choices() crash on invalid choices.
2018-08-22 09:15:19 -04:00
Claude Paroz
50b8493581
Refs #29654 -- Replaced three dots with ellipsis character in output strings.
2018-08-22 09:13:58 -04:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
233c70f047
Fixed #29658 -- Registered model lookups in tests with a context manager.
2018-08-21 12:17:46 -04:00
Claude Paroz
201017df30
Fixed #29654 -- Made text truncation an ellipsis character instead of three dots.
...
Thanks Sudhanshu Mishra for the initial patch and Tim Graham for the review.
2018-08-21 17:46:45 +02:00
Jon Dufresne
ef87b38ef7
Fixed #29696 -- Prevented BaseModelFormSet.initial_form_count()'s from treating data={} as unbound.
2018-08-21 10:02:03 -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
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
Ming Qin
cfb4845f06
Fixed #29625 -- Made Model.refresh_from_db() clear prefetch related caches.
2018-08-20 12:01:42 -04:00
Tim Graham
d311124be5
Fixed #29682 -- Fixed admin change form crash if a view-only model's form has an extra field.
2018-08-20 11:14:20 -04:00
Jon Dufresne
03a2c783e8
Fixed admin_checks tests to run in isolation.
2018-08-19 08:31:59 -07:00
Josh Schneier
3daac76cfb
Simplified how createsuperuser tests generate passwords.
2018-08-18 16:26:13 -04:00
Tom Forbes
8c70ba92dd
Refactored validators tests to use subtests.
2018-08-18 15:04:48 -04:00
Sigurd Ljødal
3e09b37f80
Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.
2018-08-18 13:09:15 -04:00
mackong
c832885a3e
Fixed #29426 -- Made UUID inputs in the admin match the width of a UUID.
2018-08-18 10:16:22 -04:00
Tim Graham
838d6dcb86
Refs #29426 -- Made UUIDField render values with dashes.
2018-08-18 08:20:21 -04:00
Alexander Todorov
53ebd4cb13
Fixed #29686 -- Made UserAdmin.user_change_password() pass user to has_change_permission().
2018-08-17 17:43:00 -04:00
Kamil
3d4080f19c
Fixed #29024 -- Made TestContextDecorator call disable() if setUp() raises an exception.
2018-08-17 16:30: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
Tom Forbes
c02d473781
Fixed #29612 -- Added GenericRelation prefetch_related() cache invalidation.
2018-08-17 14:58:45 -04:00
Jon Dufresne
bf17f5e884
Refs #29015 -- Added database name to PostgreSQL database name too long exception.
2018-08-17 12:43:56 -04:00
Jon Dufresne
09ee3b6fe3
Fixed #29663 -- Made admin change view redirect to changelist with view permission.
2018-08-17 11:13:06 -04:00
Nick Pope
b523d42561
Reorganized datetime db function tests.
2018-08-16 16:18:09 -04:00
Nick Pope
5c3db0ef6a
Reorganized comparison db function tests.
2018-08-16 16:04:39 -04:00
Nick Pope
3288985822
Reorganized text db function tests.
2018-08-16 15:44:31 -04:00
Nick Pope
dd3feb0891
Reorganized window db function tests.
2018-08-16 09:32:42 -04:00
KUAN Hsuan-Tso
9ec1a85c77
Removed obsolete TODO in proxy_model_inheritance test.
2018-08-16 09:20:31 -04:00
oliver
3ca24fd1c0
Optimized some cache tests with set_many().
2018-08-16 09:02:21 -04:00
Tom Forbes
a3df7574f9
Fixed #29644 -- Made SearchQuery.__str__() reflect negation and grouping.
2018-08-15 16:47:23 -04:00
Marnanel Thurman
7cc52250f0
Fixed #29662 -- Allowed test client to accept structured suffix JSON content types.
2018-08-15 10:27:45 -04:00
Jon Dufresne
f5e7506cff
Refs #27804 -- Used subTest in AdminViewPermissionsTest.
2018-08-12 21:27:19 -04:00
Ramiro Morales
b5c7cb4d33
Fixed #29653 -- Fixed missing related_query_name reverse accessor if GenericRelation is declared on an abstract base model.
...
Regression in 4ab027b944
.
Thanks Lauri Kainulainen for the report.
2018-08-10 12:17:26 -04:00
Clément Mangin
64e1a271f5
Fixed #29637 -- Fixed admin change form crash if the user doesn’t have the add permission to a TabularInline.
...
Regression in 825f0beda8
.
2018-08-10 11:20:43 -04:00
Tim Graham
730173d1c5
Fixed #29623 -- Fixed translation failure of DurationField's "overflow" error message.
2018-08-08 06:24:52 -04:00
Mariusz Felisiak
9fee229874
Fixed #29643 -- Fixed crash when combining Q objects with __in lookups and lists.
...
Regression in fc6528b25a
.
2018-08-08 08:51:20 +02:00
Josh Schneier
3767c7ff39
Fixed #29244 -- Prevented Paginator.count() from silencing TypeError and AttributeError.
2018-08-07 17:41:18 -04:00
Josh Schneier
f1bf069ec1
Refs #29244 -- Fixed django.utils.inspect.method_has_no_args() for bound methods.
2018-08-07 17:37:35 -04:00
Josh Schneier
756b859576
Renamed django.utils.inspect.func_has_no_args() to method_has_no_args().
2018-08-07 17:37:35 -04:00
Raphael Michel
155b31d4ec
Fixed #29648 -- Fixed crash when using subqueries inside datetime truncation functions.
2018-08-07 16:47:54 -04:00
Hasan Ramezani
03e918d717
Added test for django.core.management.utils.get_random_secret_key().
2018-08-05 16:06:31 -04:00
Josh Schneier
8b43e9b1af
Fixed #29616 -- Fixed createsuperuser for user models that don't have a password field.
2018-08-05 14:26:03 -04:00
Tim Graham
ec594942cd
Removed unnecessary str() in mail tests.
...
Unnecessary since their introduction in
fa75b2cb51
.
2018-08-04 10:15:51 -04:00
Josh Schneier
793e9bb35a
Fixed #29628 -- Made createsuperuser validate password against username and required fields.
2018-08-04 08:44:25 -04:00
Tom
f1fbef6cd1
Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.
2018-08-03 17:40:46 -04:00
Calvin DeBoer
058d33f3ed
Fixed #29198 -- Added migrate --plan option.
2018-08-03 15:22:42 -04:00
Mariusz Felisiak
1a9cbf41a1
Fixed #29613 -- Fixed --keepdb on PostgreSQL if the database exists and the user can't create databases.
...
Regression in e776dd2db6
.
Thanks Tim Graham for the review.
2018-08-03 10:31:55 +02:00
Tim Graham
d8e2be459f
Fixed #29627 -- Fixed QueryDict.urlencode() crash with non-string values.
...
Regression in 7d96f0c49a
.
2018-08-02 21:56:26 -04:00
Michael Sanders
271542dad1
Fixed #29499 -- Fixed race condition in QuerySet.update_or_create().
...
A race condition happened when the object didn't already exist and
another process/thread created the object before update_or_create()
did and then attempted to update the object, also before update_or_create()
saved the object. The update by the other process/thread could be lost.
2018-08-02 17:07:48 -04:00
Nick Pope
743d28f553
Refs #27869 -- Added PostgreSQL version check for GinIndex support.
2018-08-02 11:53:35 -04:00
Nick Pope
ff9543b351
Refs #25809 , #28990 -- Added PostgreSQL version check for BrinIndex support.
2018-08-02 11:50:40 -04:00
Nick Pope
6b4d1ec8ff
Fixed #29614 -- Added BTreeIndex to django.contrib.postres.
2018-08-02 11:42:57 -04:00
Nick Pope
d6381d3559
Fixed #28990 -- Added autosummarize parameter to BrinIndex.
2018-08-02 11:26:58 -04:00
Nick Pope
4c36e9e492
Fixed #28887 -- Added SpGistIndex to django.contrib.postgres.
2018-08-02 11:08:08 -04:00
Nick Pope
d526b07784
Fixed #26974 -- Added HashIndex to django.contrib.postgres.
...
Thanks Akshesh Doshi for the initial implementation.
2018-08-02 10:39:18 -04:00
Tim Graham
2092206bee
Refs #29600 -- Updated django.utils.datetime_safe now that Python 2 is unsupported.
2018-08-02 10:20:24 -04:00
Nick Pope
fa54ebc722
Simplified tests for PostgreSQL indexes.
...
- Added mixin to make tests more DRY.
- Removed redundant equality tests.
2018-08-02 10:07:10 -04:00
luz.paz
97e637a87f
Fixed typos in comments and docs.
2018-08-01 16:09:22 -04:00
Andreas Hug
a656a68127
Fixed CVE-2018-14574 -- Fixed open redirect possibility in CommonMiddleware.
2018-08-01 09:28:42 -04:00
Dražen Odobašić
9f3b9ffd51
Fixed #29617 -- Fixed Template crash if template_string is lazy.
...
Regression in 3a148f958d
.
2018-07-31 09:57:11 -04:00
Tom Forbes
4198445afc
Refs #29548 -- Fixed failing window tests on MariaDB 10.3.
2018-07-30 19:54:56 -04:00
Demur Nodia
06a11ef6ec
Fixed #26819 -- Fixed BaseModelFormSet.validate_unique() "unhashable type: list" crash.
2018-07-30 16:52:12 -04:00
Demur Nodia
c090ea97c1
Fixed nonexistent field reference in test model __str__() method.
2018-07-30 16:14:57 -04:00
Sławek Ehlert
c6238bf02b
Fixed #29467 -- Made override_settings handle errors in setting_changed signal receivers.
2018-07-30 15:59:37 -04:00
Hasan Ramezani
cebbcaa1ba
Moved yesno filter test to its file.
2018-07-27 17:15:00 -04:00
Melvyn Sopacua
e7a56eb4f0
Fixed #28659 -- Fixed LayerMapping crash with null geometry and unique.
2018-07-27 16:38:28 -04:00
Tim Graham
c72dde41e6
Fixed #29595 -- Allowed using timedelta in migrations questioner.
...
Refs #29600 -- Removed usage of django.utils.datetime_safe in migrations.
2018-07-27 11:53:49 -04:00
vinay karanam
3af695eda2
Fixed #28291 , #24726 -- Fixed ArrayField with JSONField and RangeFields.
2018-07-27 11:35:54 -04:00
Tim Graham
013d439ff0
Refs #29600 -- Added test for datetime_safe usage in localize_input().
2018-07-26 16:51:50 -04:00
Tim Graham
76852c3989
Refs #29600 -- Added test for datetime_safe usage in SelectDateWidget.value_from_datadict().
2018-07-26 16:51:40 -04:00
Carlton Gibson
1c05fe65f2
Refs #13091 -- Added test for commit=False idiom with partial unique_together validation.
2018-07-25 18:39:35 -04:00
Andrew Brown
55810d94d0
Refs #29563 -- Fixed SQLCompiler.execute_sql() to respect DatabaseFeatures.can_use_chunked_reads.
2018-07-25 18:08:57 -04:00
Simon Charette
dc1dcad0f5
Refs #24424 -- Added regression tests for MTI-inheritance model removal.
...
The issue was fixed as a side effect of implementing RemoveField's reduction
of DeleteModel to a DeleteModel in ad82900ad9
.
2018-07-25 12:07:41 -04:00
Mariusz Felisiak
ac25dd1f8d
Fixed #29569 -- Fixed Cast() with AutoField and BigAutoField.
2018-07-25 08:00:11 +02:00
Claude Paroz
2a74ceb5f3
Fixed #24336 -- Made django.conf.urls.static() ignore all absolute URLs
2018-07-24 09:32:33 +02:00
Tim Bell
cdcf4164be
Fixed #29528 -- Made URLValidator reject invalid characters in the username and password.
2018-07-23 10:30:01 -04:00
Mariusz Felisiak
5a017eef4c
Fixed test_migrate_syncdb_deferred_sql_executed_with_schemaeditor() on Oracle.
2018-07-22 08:47:55 +02:00
Simon Charette
1a28dc3887
Fixed #29582 -- Fixed a crash when using SearchVector with non text-fields.
...
The PostgreSQL concat() function handles nulls and non-text values better than
the || operator.
2018-07-21 21:32:21 -04:00
Thng Kai Yuan
71a739f3d7
Fixed #29576 -- Corrected the test client's HTTP_COOKIE header.
2018-07-21 18:14:39 -04:00
Tim Graham
8d4ab0c41f
Added tests for migrate logging and error messages.
2018-07-20 20:37:52 -04:00
Claude Paroz
b004bd62e8
Fixed #29412 -- Stopped marking slugify() result as HTML safe.
2018-07-20 10:44:30 -04:00
François Dupayrat
861638a307
Fixed #29568 -- Prevented unnecessary UPDATE queries creating child models.
2018-07-20 08:59:15 -04:00
Simon Charette
8e3f22f251
Fixed #27731 -- Implemented CreateModel/AlterFooOperation reduction.
...
This should alleviate the side effects of disabling the AlterFooOperation
reduction with RemoveField to fix refs #28862 during migration squashing
because CreateModel can perform a reduction with RemoveField.
Thanks Nick Pope for the review.
2018-07-19 17:06:01 -04:00
Simon Charette
ed7898e1b5
Fixed #28862 -- Disabled optimization of AlterFooTogether and RemoveField.
...
AlterFooTogether operations cannot be swapped with RemoveField operations on
the same model as they could be removing the the same field as well.
Since AlterFooTogether operations don't track what their previous value was,
it's impossible to determine whether or not the optimization is safe so the
only way to proceed is to disable the optimization.
Thanks Ramiro Morales for the in-depth analysis of the issue.
Refs #24828
2018-07-19 17:06:01 -04:00
Hasan Ramezani
55b6f7af0c
Completed test coverage for django.urls.utils.get_callable().
2018-07-19 16:48:23 -04:00
Claude Paroz
0adfba968e
Fixed #29578 -- Made numberformat.format() honor forced l10n usage.
...
Thanks Sassan Haradji for the report.
2018-07-19 16:44:40 -04:00
Viktor Danyliuk
6ae7aaa7d6
Fixed #29413 -- Prevented evaluation of QuerySet.get_or_create()/update_or_create() defaults unless needed.
...
Removed the logic added in 81e05a418d
which
was obsolete since dbffffa7dc
.
2018-07-16 22:08:43 -04:00
Josh Schneier
4d48ddd8f9
Fixed #28917 -- Prevented Paginator's unordered warning on EmptyQuerySet.
...
Thanks carltongibson for the idea and weijunji for the initial patch.
2018-07-16 14:28:47 -04:00
Mariusz Felisiak
dd3b470719
Fixed #29542 -- Fixed invalid SQL if a Subquery from the HAVING clause is used in the GROUP BY clause.
...
Thanks Tim Graham for the review.
2018-07-14 12:03:22 +02:00
Peter Inglesby
312eb5cb11
Fixed #26291 -- Allowed loaddata to handle forward references in natural_key fixtures.
2018-07-13 17:54:47 -04:00
Daniel Wiesmann
8f75d21a2e
Fixed #28566 -- Added path matching to collectstatic ignore patterns.
2018-07-13 16:48:19 -04:00
Claude Paroz
c28bf990d7
Refs #29548 -- Fixed GIS tests on MariaDB
2018-07-13 18:27:30 +02:00
Oliver Sauder
a07a49ee32
Fixed #29559 -- Fixed TransactionTestCase.reset_sequences for auto-created m2m through models.
2018-07-11 17:20:29 -04:00
Tim Graham
4d98b9d729
Refs #9804 -- Fixed test for sequence reset of M2M with inherited through model.
2018-07-11 16:45:29 -04:00
Simon Charette
37cafbfb79
Fixed #27845 -- Allowed both right and left optimizations of operations.
...
Thanks Raphael Gaschignard for the suggestion.
2018-07-11 10:49:50 -04:00
Simon Charette
0025dd5eb4
Allowed RemoveField operations to be optimized through.
2018-07-11 10:49:50 -04:00
Simon Charette
50b8c98a0f
Relaxed FieldOperation.references_field remote field checking.
2018-07-11 10:49:50 -04:00
Simon Charette
ad82900ad9
Fixed #26720 -- Prevented invalid CreateModel optimizations of related fields.
2018-07-11 10:49:50 -04:00
Simon Charette
a97845a823
Fixed #27768 -- Allowed migration optimization of CreateModel order.
...
Thanks Ed Morley from Mozilla for the tests.
2018-07-11 10:49:50 -04:00
Simon Charette
d3a935f01f
Refs #27768 -- Reversed order of optimized and in-between operations.
...
Operations can only be optimized through if they don't reference any of the
state the operation they are compared against defines or alters, so it's
safe to reverse the order.
2018-07-11 10:49:50 -04:00
Jon Dufresne
e26b780a24
Silenced warnings in deprecation tests.
2018-07-11 09:10:31 -04:00
Simon Charette
e4c0878b30
Refs #22875 -- Fixed an optimizer test to use a valid scenario.
...
An explicit intermediary many-to-many relationship must declare forward and
reverse foreign keys. The original issue was in the autodetector as these
operations shouldn't have been generated in this order in the first place
which is tested by AutodetectorTests.test_create_with_through_model.
2018-07-10 16:47:57 -04:00
Ian Foote
952f05a6db
Fixed #11964 -- Added support for database check constraints.
2018-07-10 15:32:33 -04:00
Jon Dufresne
08ebed5e79
Fixed #29556 -- Made 'remove_stale_contenttypes --noinput' delete content types.
2018-07-10 10:14:34 -04:00
Tim Graham
178624855a
Simplified a couple test docstrings.
2018-07-10 09:43:12 -04:00
Jon Dufresne
e7d7d47b93
Fixed ResourceWarning from unclosed test files.
...
When running Django tests with Python warnings enabled.
2018-07-10 12:26:19 +02:00
Sergey Fedoseev
338f741c5e
Fixed #29546 -- Deprecated django.utils.timezone.FixedOffset.
2018-07-09 16:33:36 -04:00
Tom Forbes
45c035c823
Refs #29548 -- Fixed non-GIS test failures on MariaDB.
2018-07-09 14:59:42 -04:00
Tim Graham
5bea8d256d
Fixed #29553 -- Made test client set Content-Length header to a string rather than integer.
2018-07-09 11:44:49 -04:00