* Fixed#5363 -- HTML5 datetime-local valid format HTMLFormRenderer
Co-authored-by: Peter Thomassen
* Add condition to make code cleanable by pyupgrade
---------
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
* Standardize spelling to American English (only in .md files)
* Update remaining British english spell words to American english style
* Configures the codespell pre-commit hook to enforce US English consistency
changes:
- Activates the `en-GB_to_en-US` built-in dictionary to flag British spellings
- Created codespell-ignore-words.txt file to ignore specific words
- include `code` and `names` for comprehensive typo checking in technical contexts.
- changed the 'lets' to 'let's'.
* Update blacken-docs and black to latest versions
* Include docs folder for blackend-docs
* Run blacken docs on docs folder
* Fix broken link on authentication page
* fix(serializer): restore get_unique_together_constraints method signature
Extracted error message logic to a separate method.
fix: conditionally include violation_error_code for Django >= 5.0
fix(validators): use custom error message and code from model constraints
* fix: add model parents to create unique_constraint_by_fields
* fix: order of model classes in the unique_constraint_by_fields
* 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
* 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>
* 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>
* 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>
* 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
* 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
* 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>
* 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>
* 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>
* 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