django-rest-framework/rest_framework
Saad Aleem e2a4559c03
Fix validation for ListSerializer (#8979)
* fix: Make the instance variable of child serializer point to the correct list object instead of the entire list when validating ListSerializer

* fix formatting issues for list serializer validation fix

* fix imports sorting for list serializer tests

* remove django 2.2 from docs index (#8982)

* Declared Django 4.2 support in README.md (#8985)

* Fix Links in Documentation to Django `reverse` and `reverse_lazy` (#8986)

* Fix Django Docs url in reverse.md

Django URLs of the documentation of `reverse` and `reverse_lazy` were wrong.

* Update reverse.md

* fix URLPathVersioning reverse fallback (#7247)

* fix URLPathVersioning reverse fallback

* add test for URLPathVersioning reverse fallback

* Update tests/test_versioning.py

---------

Co-authored-by: Jorn van Wier <jorn.van.wier@thunderbyte.ai>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>

* Make set_value a method within `Serializer` (#8001)

* Make set_value a static method for Serializers

As an alternative to #7671, let the method be overridden if needed. As
the function is only used for serializers, it has a better place in the
Serializer class.

* Set `set_value` as an object (non-static) method

* Add tests for set_value()

These tests follow the examples given in the method.

* fix: Make the instance variable of child serializer point to the correct list object instead of the entire list when validating ListSerializer

* Make set_value a method within `Serializer` (#8001)

* Make set_value a static method for Serializers

As an alternative to #7671, let the method be overridden if needed. As
the function is only used for serializers, it has a better place in the
Serializer class.

* Set `set_value` as an object (non-static) method

* Add tests for set_value()

These tests follow the examples given in the method.

* fix: Make the instance variable of child serializer point to the correct list object instead of the entire list when validating ListSerializer

* fix: Make the instance variable of child serializer point to the correct list object instead of the entire list when validating ListSerializer

* fix formatting issues for list serializer validation fix

* fix: Make the instance variable of child serializer point to the correct list object instead of the entire list when validating ListSerializer

* fix formatting issues for list serializer validation fix

* fix linting

* Update rest_framework/serializers.py

Co-authored-by: Sergei Shishov <sshishov@users.noreply.github.com>

* Update rest_framework/serializers.py

Co-authored-by: Sergei Shishov <sshishov@users.noreply.github.com>

* fix: instance variable in list serializer, remove commented code

---------

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
Co-authored-by: Mehraz Hossain Rumman <59512321+MehrazRumman@users.noreply.github.com>
Co-authored-by: Dominik Bruhn <dominik@dbruhn.de>
Co-authored-by: jornvanwier <mail@jornvanwier.com>
Co-authored-by: Jorn van Wier <jorn.van.wier@thunderbyte.ai>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Étienne Beaulé <beauleetienne0@gmail.com>
Co-authored-by: Sergei Shishov <sshishov@users.noreply.github.com>
2023-05-29 20:03:11 +06:00
..
authtoken Add username search field for TokenAdmin (#8927) (#8934) 2023-04-08 14:56:49 +06:00
locale Translations updated from transifex and compiled 2020-10-13 22:05:24 +02:00
management Add --api-version CLI option to generateschema (#8663) 2022-09-22 10:36:01 +01:00
schemas Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
static/rest_framework Bump version of jQuery to 3.6.4 & updated ref links (#8909) 2023-03-28 15:43:25 +06:00
templates/rest_framework Use consistent spelling for "authorization" (#8929) 2023-04-04 13:38:23 +06:00
templatetags Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
utils Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
__init__.py Use correct class to indicate present deprecation (#8665) 2022-09-22 14:07:43 -04:00
apps.py Make DEFAULT_PAGINATION_CLASS None by default. (#5170) 2017-09-25 15:36:30 +02:00
authentication.py replace partition with split in BasicAuthentication (#8790) 2022-12-08 09:52:35 +06:00
checks.py Fix punctuation in system check (#7281) 2020-04-20 16:40:05 -07:00
compat.py Replaced parse_header with parse_header_parameters. (#8556) 2022-07-14 14:20:36 +02:00
decorators.py if else optimization (#8340) 2022-01-27 15:02:20 +00:00
documentation.py Updated url()'s with path() and re_path() (#7492) 2020-08-25 13:50:02 +02:00
exceptions.py feat: Add some changes to ValidationError to support django style vadation errors (#8863) 2023-02-06 17:30:48 +06:00
fields.py Make set_value a method within Serializer (#8001) 2023-05-24 19:59:42 +06:00
filters.py Ordering filter bug with model property serializer field (#7609) 2021-03-16 12:53:39 +00:00
generics.py Allow generic requests, responses, fields, views (#8825) 2023-02-22 21:39:01 +06:00
metadata.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
mixins.py Re-prefetch related objects after updating (#8043) 2023-01-11 15:30:15 +06:00
negotiation.py Replaced parse_header with parse_header_parameters. (#8556) 2022-07-14 14:20:36 +02:00
pagination.py fix: fallback on CursorPagination ordering if unset on the view (#8954) 2023-05-02 06:55:59 +06:00
parsers.py Refactor: Replace try/except with contextlib.suppress() (#8676) 2022-10-05 11:02:00 +01:00
permissions.py Fix Respect can_read_model permission in DjangoModelPermissions (#8009) 2023-01-13 14:52:54 +06:00
relations.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
renderers.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
request.py Allow generic requests, responses, fields, views (#8825) 2023-02-22 21:39:01 +06:00
response.py Allow generic requests, responses, fields, views (#8825) 2023-02-22 21:39:01 +06:00
reverse.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
routers.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00
serializers.py Fix validation for ListSerializer (#8979) 2023-05-29 20:03:11 +06:00
settings.py Avoid importing django.test package when not testing (#8699) 2022-10-14 16:30:26 +01:00
status.py Added http 102, 103, 421, and 425 status codes (#8350) 2022-02-03 11:57:47 +00:00
test.py Make APIClient.force_authenticate() work with user=None (#8212) 2022-09-15 09:35:48 +01:00
throttling.py Fix error in throttling when request.user is None (#8370) 2022-06-24 13:02:11 +01:00
urlpatterns.py Updated url()'s with path() and re_path() (#7492) 2020-08-25 13:50:02 +02:00
urls.py Replace all url() calls with path() or re_path() (#7512) 2020-09-08 15:32:27 +01:00
validators.py Implement __eq__ for validators (#8925) 2023-04-09 14:53:47 +06:00
versioning.py fix URLPathVersioning reverse fallback (#7247) 2023-05-18 09:46:40 +06:00
views.py Preserve exception messages for wrapped Django exceptions (#8051) 2022-10-11 12:48:57 +00:00
viewsets.py Replaced OrderedDict with dict (#8964) 2023-04-30 15:20:02 +06:00