Mariusz Felisiak
b06cf62c88
Cleaned up temporary test directories in tests.
2024-07-22 08:51:01 +02:00
Alexander Lötvall
38ad710aba
Fixed #35483 -- Added NUL (0x00) character validation to ModelChoiceFields.
...
Applied the ProhibitNullCharactersValidator to ModelChoiceField and ModelMultipleChoiceField.
Co-authored-by: Viktor Paripás <viktor.paripas@gmail.com>
Co-authored-by: Vasyl Dizhak <vasyl@dizhak.com>
Co-authored-by: Arthur Vasconcelos <vasconcelos.arthur@gmail.com>
2024-06-17 12:19:26 +02:00
Salvo Polizzi
3915d4c70d
Fixed #35060 -- Deprecated passing positional arguments to Model.save()/asave().
2024-01-02 08:42:33 +01:00
Mariusz Felisiak
a4931cd75a
Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional setting.
...
This allows early adoption of the new default "https".
2023-11-28 20:04:21 +01:00
Nick Pope
baf705f34a
Refs #34986 -- Fixed some test assertions for PyPy.
...
These failures were due to minor inconsistencies or implementation
differences between CPython and PyPy.
2023-11-28 06:19:38 +01:00
Nick Pope
171f91d9ef
Fixed #34899 -- Added blank choice to forms' callable choices lazily.
2023-10-23 13:44:23 -03:00
Gregor Jerše
966ecdd482
Fixed #32819 -- Established relationship between form fields and their help text.
...
Thanks Nimra for the initial patch.
Thanks Natalia Bidart, Thibaud Colas, David Smith, and Mariusz Felisiak
for reviews.
2023-07-06 08:03:19 +02:00
Coen van der Kamp
7bbbadc693
Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
...
This also deprecates "http" as the default scheme.
2023-04-28 06:58:10 +02:00
Mariusz Felisiak
720abed343
Avoided creating default form fields in fields_for_model() when declared on form.
2023-04-27 15:26:23 +02:00
Kamil Turek
e03cdf76e7
Fixed #31721 -- Allowed ModelForm meta to specify form fields.
2022-08-08 09:46:05 +02:00
Mariusz Felisiak
c18861804f
Fixed warnings per flake8 5.0.0.
2022-07-31 08:16:19 +02:00
David Smith
d126eba363
Refs #32339 -- Deprecated default.html form template.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-05-17 11:16:54 +02:00
Mariusz Felisiak
8e89dfe1c2
Fixed various tests on MySQL with MyISAM storage engine.
2022-04-18 07:05:52 +02:00
Mariusz Felisiak
1760ad4e8c
Relaxed some query ordering assertions in various tests.
...
It accounts for differences seen on MySQL with MyISAM storage engine.
2022-04-14 12:12:13 +02:00
SanderBeekhuis
27d52158b2
Fixed #33627 -- Improved nonexistent pk in ModelMultipleChoiceFieldTests.test_model_multiple_choice_field().
2022-04-13 08:31:23 +02:00
Nick Pope
847f46e9bf
Removed redundant QuerySet.all() calls in docs and tests.
...
Most QuerySet methods are mapped onto the Manager and, in general,
it isn't necessary to call .all() on the manager.
2022-02-22 10:29:38 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Claude Paroz
7c4f396509
Stopped including type="text/css" attributes for CSS link tags.
2022-01-22 16:38:14 +01:00
David Smith
eba9a9b7f7
Refs #32338 -- Added Boundfield.legend_tag().
2021-12-09 07:16:33 +01:00
Aljaž Košir
7b8beeee3d
Fixed #33155 -- Made ModelChoiceIteratorValue instances hashable.
2021-09-30 12:07:50 +02:00
Hasan Ramezani
0a28b42b15
Fixed #33084 -- Removed incorrect system check for ManyToManyField with limit_choices_to.
2021-09-09 12:07:59 +02:00
David Smith
5942ab5eb1
Refs #32338 -- Made RadioSelect/CheckboxSelectMultiple render in <div> tags.
...
This improves accessibility for screen reader users.
2021-08-27 06:14:01 +02:00
Hasan Ramezani
3f7b327562
Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.
...
This also replaces assertQuerysetEqual() to
assertSequenceEqual()/assertCountEqual() where appropriate.
Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-11-06 09:24:50 +01:00
alvinshaita
556fa4bbba
Fixed #1891 , Fixed #11707 -- Prevented duplicates with limit_choices_to on multi-value relations.
2020-10-27 20:40:04 +01:00
David Smith
b8239cae19
Refs #28009 -- Added empty_value tests for CharField subclasses.
2020-09-25 12:33:54 +02:00
David Smith
e74b3d724e
Bumped minimum isort version to 5.1.0.
...
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
2020-07-30 10:58:59 +02:00
Mariusz Felisiak
09914ccf68
Fixed test_clean_does_deduplicate_values on Oracle after e13cfc6dfd
.
2020-06-26 22:37:58 +02:00
Jon Dufresne
e13cfc6dfd
Fixed #31596 -- Changed ForeignKey.validate() to use the base manager.
2020-06-25 11:36:20 +02:00
Jon Dufresne
3b1cb78063
Used assertIs(…, True) in model_forms.tests.ValidationTest.
2020-05-18 09:25:26 +02:00
François Freitag
9ef4a18dbe
Changed django.forms.ValidationError imports to django.core.exceptions.ValidationError.
...
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-04-28 10:49:00 +02:00
Hasan Ramezani
da79ee472d
Fixed #26813 -- Prevented empty choice in ModelChoiceField with RadioSelect for fields with blank=False.
2020-02-05 10:27:01 +01:00
Mariusz Felisiak
1d5fb35e6a
Refs #26813 -- Added test for ModelChoiceField.choices when using RadioSelect widget.
2020-02-05 09:21:38 +01:00
Jon Dufresne
67ea35df52
Fixed #30998 -- Added ModelChoiceIteratorValue to pass the model instance to ChoiceWidget.create_option().
2019-12-23 10:34:50 +01:00
Jon Dufresne
8d087f9a17
Fixed typo in ModelChoiceFieldTests.
...
The subindex and attrs arguments should be passed through to the parent,
not overridden as None.
2019-12-11 15:15:12 +01:00
Jon Dufresne
e703b93a65
Fixed #31080 -- Removed redundant type="text/javascript" attribute from <script> tags.
2019-12-11 09:49:54 +01:00
Etienne Chové
e7cdb0cd7e
Fixed #30014 -- Fixed ModelChoiceField validation when initial value is a model instance.
...
Thanks Carlton Gibson for reviews.
2019-10-11 13:28:09 +02:00
Etienne Chové
a12f9cd95a
Added ModelChoiceField test for validation with to_field_name.
2019-10-11 13:28:06 +02:00
Jon Dufresne
42b9a23267
Fixed #30400 -- Improved typography of user facing strings.
...
Thanks Claude Paroz for assistance with translations.
2019-06-28 16:46:18 +02:00
RobertAKARobin
aa94f7c899
Fixed #30534 -- Fixed overriding a field's default in ModelForm.cleaned_data().
2019-06-04 08:28:49 +02:00
Jon Dufresne
8d76443aba
Fixed #30399 -- Changed django.utils.html.escape()/urlize() to use html.escape()/unescape().
2019-04-25 15:09:07 +02:00
belegnar
1ffddfc233
Fixed #30302 -- Fixed forms.model_to_dict() result if empty list of fields is passed.
2019-04-03 09:05:15 +02:00
belegnar
714cf468e1
Refs #30302 -- Added more tests for forms.model_to_dict().
2019-04-03 08:59:08 +02:00
Tim Graham
0004daa536
Used 4 space hanging indent for dictionaries.
...
Thanks Mariusz Felisiak for auditing.
2019-01-02 18:18:19 -05:00
Matt Wiens
e817ae74da
Followed style guide for model attribute ordering.
2018-12-27 19:34:14 -05:00
Manan
3a4558b84f
Moved choices inside of test models per coding style.
2018-12-10 09:28:49 -05:00
Simon Charette
84e7a9f4a7
Switched setUp() to setUpTestData() where possible in Django's tests.
2018-11-27 09:35:17 -05:00
Tim Graham
193c109327
Switched TestCase to SimpleTestCase where possible in Django's tests.
2018-11-27 08:58:44 -05: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
François Freitag
d1413c5d70
Refs #28312 -- Added an optimized __bool__() to ModelChoiceIterator.
...
COUNT is more expensive than EXISTS; use the latter when possible.
2018-04-23 13:03:07 -04:00