Commit Graph

8898 Commits

Author SHA1 Message Date
Genaro Camele
eb4ed07d94
Refine error message in ManyToManySourceSerializer test
Updated the error message for ManyToManySourceSerializer to remove suggestion for default value to make the test work
2025-10-13 16:36:35 -03:00
Genaro Camele
e87a82b3fc
Improved comment on serializer instantiation 2025-10-13 16:32:33 -03:00
Genaro Camele
9d8b176374
Improved ValueError msg 2025-10-13 16:29:24 -03:00
Asif Saif Uddin {"Auvi":"অভি"}
04703dca8a
Update tests/test_serializer.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-28 10:09:37 +06:00
Genaro Camele
edaf07b45d Added some important notes on contributing.md 2025-09-25 22:35:31 -03:00
Genaro Camele
7e8962c622 Added validation on ManyToMany relations when default=None
+ Added tests
2025-09-25 22:35:14 -03:00
#!z@nko...
f0ba887761
docs: Remove outdated AllowPUTAsCreateMixin reference (#9788) 2025-09-25 18:58:51 +06:00
Sébastien Corbin
4170e1a473
Update french translation (#9770) 2025-09-20 11:19:28 +01:00
Cheery
cf923511e7
Add missing decorators: @versioning_class(), @content_negotiation_class(), @metadata_class() for function based views (#9719) 2025-09-20 11:12:17 +01:00
Mathieu Dupuy
2001878298
Migrate packaging to pyproject.toml (#9056)
Co-authored-by: Terence Honles <terence@honles.com>
Co-authored-by: Terence Honles <terencehonles@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2025-09-19 11:45:47 +01:00
dependabot[bot]
0f576223f2
Bump actions/setup-python from 5 to 6 in the github-actions group (#9776) 2025-09-15 20:45:27 +01:00
Bruno Alla
1472848501
Adjust CI matrix to reflect upstream Django support (#9768) 2025-08-21 09:35:51 +06:00
Marcelo Galigniana
503f0603e6
Add documentation about how to transform factory request to DRF request (#9380) 2025-08-16 13:09:47 +06:00
Bruno Alla
0d0be8467d
Rename 'master' branch to 'main' (#9761) 2025-08-15 12:28:05 +01:00
Nicolas Delaby
513ddb4ffb
Condition of UniqueTogetherValidator can be read-only (#9764)
* Condition of UniqueValidator can be read-only

We can't always expect to find the value of the condition in the serializer
if the field is read-only.

* Reproducible test
2025-08-13 10:53:25 +06:00
Devid
c8b6d3dcdf
DurationField output format (#8532)
* Allow format duration as ISO-8601

* Update tests/test_fields.py

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Update tests/test_fields.py

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Add validation for DurationField format, add more tests for it and improve related docs

* Add more precise validation check for duration field format and adjust docs

* Adjust typo in duration field docs

---------

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-08-12 16:21:01 +02:00
dependabot[bot]
c73dddfada
Bump actions/checkout from 4 to 5 in the github-actions group (#9763)
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 13:08:20 +06:00
Bruno Alla
317ca8244d
Automate docs deployment (#9759)
On pushes to master, when the content of the docs or its config chnages
2025-08-10 23:06:29 +06:00
Mahdi Rahimi
c0166d95bb
Prevent small risk of Token overwrite (#9754)
* Fix #9250: Prevent token overwrite and improve security

- Fix key collision issue that could overwrite existing tokens
- Use force_insert=True only for new token instances
- Replace os.urandom with secrets.token_hex for better security
- Add comprehensive test suite to verify fix and backward compatibility
- Ensure existing tokens can still be updated without breaking changes

* Fix code style: remove trailing whitespace and unused imports

* Fix #9250: Prevent token overwrite with minimal changes

- Add force_insert=True to Token.save() for new objects to prevent overwriting existing tokens
- Revert generate_key method to original implementation (os.urandom + binascii)
- Update tests to work with original setUp() approach
- Remove verbose comments and unrelated changes per reviewer feedback

* Fix flake8 violations: remove extra blank lines and trailing whitespace

* Update tests/test_authtoken.py

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Update tests/test_authtoken.py

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Update tests/test_authtoken.py

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Fix token key regeneration behavior and add test

* Update tests/test_authtoken.py

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-08-10 16:52:32 +06:00
Khaled Sukkar
92a2c4d3cb
add a new third-party package in serializers.md (#9717)
* Update serializers.md

add a new third-party package in serializers section

* Update third-party-packages.md

add drf-shapeless-serializers to the serializers section.

* Update docs/community/third-party-packages.md

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-08-10 10:12:11 +06:00
Mahdi Rahimi
97a771c405
Refactor token generation to use secrets module (#9760)
* Refactor token generation to use secrets module

* test: Add focused tests for Token.generate_key() method

- Add test for valid token format (40 hex characters)
- Add collision resistance test with 500 sample size
- Add basic randomness quality validation
- Ensure generated keys are unique and properly formatted
2025-08-10 09:42:52 +06:00
Bruno Alla
edc055da78
Fix a number of broken links in the docs (#9758)
As reported by pylinkvalidate.py script
2025-08-09 20:20:07 +06:00
Bruno Alla
64c3d9ef63
Restore references to GitHub Issues and Discussions (#9757)
* Revert "Removed reference to GitHub Issues and Discussions (#9660)"

This reverts commit ffadde930e.

* Remove issue template

* Update discussions description

* Remove recommendations to open issues from the docs

* Change a few non-breakable spaces to regular ones for better syntax highlighting in the editors
2025-08-09 12:44:46 +06:00
Bruno Alla
de018df2aa
Prepare 3.16.1 release (#9752) 2025-08-06 18:40:31 +01:00
Sezer Bozkır
a7d050f5b3
Turkish Translation updates (#9749) 2025-08-01 16:33:52 +01:00
Jakub Kulík
853969c69c
Fix test with Django 5 when pytz is available (#9715)
* Fix test with Django 5 when pytz is available

* fix formatting

* remove original condition

Co-authored-by: Ülgen Sarıkavak <ulgens@users.noreply.github.com>

* remove trailing whitespace

* further improvements

* let's not skip the pytz test - it should always be executed when testing against Django 4

* add comment to test requirements

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* simplify the pytz import as it should always be available

* make isort happy

---------

Co-authored-by: Ülgen Sarıkavak <ulgens@users.noreply.github.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-07-24 08:47:47 +01:00
Ali Hassan
2ae8c117da
Add note to tutorial about required request in serializer context when using HyperlinkedModelSerializer (#9732)
* Fix : Updated documentation in tutorial 5 leading to error

* Updated docs/tutorial/5-relationships-and-hyperlinked-apis.md

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Missing newline

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-07-07 13:11:24 +02:00
Ryan
70e54f45ad
Revert docs back to djangorestframework-guardian (#9734) 2025-07-06 15:39:52 +01:00
Peter Thomassen
3038494705
Document that unique constraints cause required=True in ModelSerializer (#9725) 2025-06-26 18:39:51 +01:00
Dulat Kushibayev
4bb46c2949
Add Kazakh(kk) locale support (#9713)
* Add Kazakh(kk) locale support

* Header comment update

* Refined a translation for improved contextual accuracy
2025-06-25 08:30:54 +01:00
Konstantin Alekseev
e454758fb6
Fix regression in unique_together validation with SerializerMethodField (#9712) 2025-06-10 12:47:28 +01:00
Federico Bond
33d59fefaa
Update Spanish translations (#9701) 2025-05-25 11:07:43 +01:00
Rohit
c0202a0aa5
Update Django documentation links to use stable version (#9698)
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-05-13 15:10:21 +01:00
Rohit
985dd732e0
Fix broken Heroku JSON Schema link in schemas.md (#9693)
Replaced the outdated Heroku JSON Schema reference URL, which was returning a 404 error, with the updated working link from the official Heroku blog.
2025-05-01 13:44:34 +01:00
Tom Christie
78e97074e7
Drop HTML line breaks on long headers in browsable API (#9438)
* Drop HTML line breaks on long headers

* Remove related test

* Fix flake8

---------

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2025-04-28 04:08:48 +00:00
rezatn0934
376026ce35
Update persian translations (#9576) 2025-04-26 15:58:29 +01:00
Salman Saeed Albukhaitan
d375154d18
Update Arabic translations (#9595) 2025-04-26 15:42:44 +01:00
Josh Thomas
543996711d
Fix UniqueTogetherValidator to handle fields w/ source attr (#9688)
* Add failing test for `UniqueConstraint` validation with `source` attribute

* Fix `UniqueTogetherValidator` to handle fields with source attribute

* split inner sources logic out to tuple comprehension
2025-04-23 09:03:14 +00:00
Carlton Gibson
07d3e1ec8f
Updated funding page to represent current scope. (#9686) 2025-04-10 12:05:06 +02:00
Ülgen Sarıkavak
ea1da76196
Add pyupgrade to pre-commit hooks (#9682) 2025-04-09 06:24:18 +00:00
Yousef Abu Shanab
2fbfaae507
Add drf-restwind and update outdated images in browsable-api.md (#9680)
* add drf-restwind

* Add images of 3rd party customization packages
2025-04-08 08:32:04 +00:00
Bruno Alla
3c755794df
Cleanup dependencies and conditions for unsupported Python versions (#9681)
* Remove optional install backports.zoneinfo for unsupported Python versions and associated code

* Remove conditions in tests for unsupported Python versions

* Remove condition for unsupported Python versions
2025-04-08 08:29:40 +00:00
ren000thomas
c41314f1fc
Update Chinese translations (#9675) 2025-04-05 11:02:59 +01:00
JAEGYUN JUNG
5c21fa757c
Update test matrix to use Django 5.2 stable version (#9679) 2025-04-04 11:39:11 +01:00
Stefan
141ab8e585
Add missing & fix German translations (#9676) 2025-04-04 09:24:28 +01:00
JAEGYUN JUNG
3ba8ef967e
Update GitHub Actions to use Ubuntu 22.04 for testing (#9677) 2025-04-02 18:35:29 +01:00
JAEGYUN JUNG
9b1e8d2d43
Add missing & fix Korean translations (#9571)
* update django.po file

* update django.po translators

* Changed the translation for the word “User” from “유저” to “사용자” to make it consistent with Django's translation

reference: 5a91ad3d71/django/contrib/admin/locale/ko/LC_MESSAGES/django.po (L601)

* Add missing translation for the word “Token"

* Fix wrong translation for word "Created"

* Fix translation for "Tokens", just like django translation.

reference: 5a91ad3d71/django/contrib/auth/locale/ko/LC_MESSAGES/django.po (L235)

* Add missing translation for "Invalid Input"

* Add missing translation for throttling messages

* Add missing translation for CharField, BooleanField messages

* fix: remove unnecessary space

* Feat: add missing translation for SlugField error message

* Feat: add missing translation for UUIDField error message

* Fix: add (boolean) for booleanField message

* Feat: add missing translation for `integer to float` error message

* Feat: add & fix translation for DecimalField

* Feat: add & fix translation for DateTimeField

* Feat: add & fix translation for DurationField

* Feat: add & fix translation for Selection&FilePathField

* Feat: add & fix translation for DictField

* Feat: add missing translation for filters

* Feat: add missing translations for template

* Feat: Change end punctuation to the “~세요.” used by Django translations

* update django.po translators

* Feat: add compiled message file

* Update rest_framework/locale/ko_KR/LC_MESSAGES/django.po

Co-authored-by: taezero <51291185+overtae@users.noreply.github.com>

* Update rest_framework/locale/ko_KR/LC_MESSAGES/django.po

Co-authored-by: taezero <51291185+overtae@users.noreply.github.com>

* Feat: remove unnecessary multliline from django.po(kor translation)

* Feat: remove unnecessary multliline from django.po(kor translation)

* Feat: update Korean translations for authentication messages

* Feat: Remove unnecessary English parenthesis descriptions

* Feat: Remove unnecessary English parenthesis descriptions

* Feat: Remove unnecessary English parenthesis descriptions

* Feat: Update compiled message file for ko_KR

---------

Co-authored-by: taezero <51291185+overtae@users.noreply.github.com>
2025-04-02 18:17:04 +01:00
Michiel W. Beijen
ffadde930e
Removed reference to GitHub Issues and Discussions (#9660) 2025-03-31 15:22:15 +01:00
Matheus Oliveira
6f274ab862
Fix some typos in pt_BR translations (#9673) 2025-03-31 10:43:53 +01:00
Bruno Alla
ac50cec76c
Prepare v3.16, release notes, and announcement. (#9671)
* Start drafting release notes from 3.16 (Generated from GitHub)
* Reformat changes and split into sections
* Format GitHub PRs links for the docs
* Link new contributors in Markdown format
* Write up 3.16 announcement
* Bump version
* Add entry for removed Python 3.8 support
* Update release date to 28/03

* Minor rewording

* Add 3.16 announcement to the navbar and link to docs
2025-03-28 15:16:33 +01:00