Commit Graph

8804 Commits

Author SHA1 Message Date
Asif Saif Uddin
2445421821
Merge branch 'master' into drop-break-long-headers 2024-06-15 14:30:29 +06:00
Ivan Studinsky
1e9b5c15ec
Provide tests for hashing of OperandHolder (#9437) 2024-06-15 14:00:28 +06:00
Tom Christie
c7a7eae551
Version 3.15.2 (#9439) 2024-06-14 16:34:21 +01:00
Seokchan Yoon
3b41f01241
Fix potential XSS vulnerability in break_long_headers template filter (#9435)
The header input is now properly escaped before splitting and joining with <br> tags. This prevents potential XSS attacks if the header contains unsanitized user input.
2024-06-14 10:52:02 +01:00
Tom Christie
bf9212d070 Drop HTML line breaks on long headers 2024-06-14 10:29:28 +01:00
Ivan Studinsky
fe92f0dd0d
Add __hash__ method for permissions.OperandHolder class (#9417)
`OperandHolder` is not hashable, so need to add `__hash__` method
2024-06-10 12:19:06 +06:00
wkwkhautbois
fbdab09c77
docs: Correct some evaluation results and a httpie option in Tutorial1 (#9421)
* Tutorial 1: Added --unsorted option to httpie calls to prevent automatic json key sorting

* Tutorial 1: Changed evaluation results accurate
2024-06-02 10:14:37 +06:00
Stanislav Levin
36d5c0e74f
tests: Check urlpatterns after cleanups (#9400)
According to docs:
https://docs.python.org/3/library/unittest.html#unittest.TestCase.addClassCleanup

> Add a function to be called after tearDownClass() to cleanup resources
  used during the test class. Functions will be called in reverse order to
  the order they are added (LIFO).

This was revealed with recent change in pytest (`8.2.0`):
> pytest-dev/pytest#11728: For unittest-based tests, exceptions during
  class cleanup (as raised by functions registered with
  TestCase.addClassCleanup) are now reported instead of silently failing.

`check_urlpatterns` is called before `cleanup_url_patterns` and fails
(problem was hidden by `pytest < 8.2.0`).

`doClassCleanups` can be used instead to check after-cleanup state:

https://docs.python.org/3/library/unittest.html#unittest.TestCase.doClassCleanups

> This method is called unconditionally after tearDownClass(), or after
  setUpClass() if setUpClass() raises an exception.

  It is responsible for calling all the cleanup functions added by
  addClassCleanup(). If you need cleanup functions to be called prior to
  tearDownClass() then you can call doClassCleanups() yourself.

Fixes: https://github.com/encode/django-rest-framework/issues/9399

Signed-off-by: Stanislav Levin <slev@altlinux.org>
2024-05-07 13:05:03 +06:00
Peter Thomassen
9d4ed054bf
Don't use Windows line endings 2024-04-30 18:28:27 +02:00
Peter Thomassen
b34bde47d7
Fix typo in setup.cfg setting 2024-04-30 18:28:26 +02:00
Peter Thomassen
ab681f2d5e
Update requirements in docs 2024-04-30 18:28:25 +02:00
Peter Thomassen
22377241a8
bump pygments (security hygiene)
Addresses https://github.com/encode/django-rest-framework/security/dependabot/9
2024-04-30 18:28:24 +02:00
Peter Thomassen
d58b8da591
Update deprecation hints 2024-04-30 18:28:23 +02:00
Peter Thomassen
d38aab39e4
Remove unused code 2024-04-30 18:28:22 +02:00
Peter Thomassen
82d91a85ff
Fix tox config 2024-04-30 18:28:21 +02:00
Peter Thomassen
1f2daaf53c
Drop support for Django < 4.2 and Python < 3.8
Discussion: https://github.com/encode/django-rest-framework/discussions/8814#discussioncomment-9237791
2024-04-30 18:28:19 +02:00
Peter Thomassen
91bbac1f67
bump mkdocs, no longer need to pin jinja2
Addresses https://github.com/encode/django-rest-framework/security/dependabot/11
2024-04-30 18:28:04 +02:00
Peter Thomassen
7900778fbe
Remove obsolete sentence from docs 2024-04-30 18:24:23 +02:00
Peter Thomassen
861b7ac42b
Adapt issue/PR template to better reflect contribution policy 2024-04-30 18:24:22 +02:00
Peter Thomassen
52bfe20dec
Adapt docs to reflect stability-focused contribution policy 2024-04-30 18:24:21 +02:00
Peter Thomassen
f642d85be2
Fix docs typo 2024-04-30 18:24:20 +02:00
Peter Thomassen
430de731e7
Clean up project management docs 2024-04-30 18:24:19 +02:00
Terence Honles
e596f43c4e
use warnings rather than logging a warning for DecimalField warnings (#9367) 2024-04-27 17:15:06 +06:00
Max Muoto
7f18ec1b53
Revert "Ensure CursorPagination respects nulls in the ordering field (#8912)" (#9381)
This reverts commit b1cec517ff.
2024-04-27 17:07:05 +06:00
Tom Christie
f96c065607
Update README.md (#9375)
Drop unnecessary self-serving promo text. (blergh) 😅
2024-04-27 16:58:44 +06:00
Jakub Szaredko
97c5617edc
Docs: Add Python 3.12 to the requirements (#9382) 2024-04-27 16:57:48 +06:00
Christian Bläul
f4daa98f48
Remove an unnecessary step from quickstart.md (#9387)
Since django is a dependency of djangorestframework, we don’t need to install it manually.
2024-04-26 13:18:16 +01:00
JAEGYUN JUNG
9864c47018
Removing live examples of tutorial code that are no longer hosted (#9363)
* docs: Removing live examples of tutorial code that are no longer hosted

* docs: Remove all references to tutorial links
2024-04-08 13:26:02 +02:00
Marcelo Galigniana
63063da082
Update renderers documentation example (#9362) 2024-04-04 10:12:19 +03:00
John-Anthony G. Thevos
085b7e166b
Apply black formatting to caching markdown (#9341)
It _looks_ like blacken-docs is failing on this file.
Running black locally fails with a failed to reformat.
This is because it expects python code, and  when it
hits the ">", there's invalid python.
2024-03-27 10:39:49 +00:00
John-Anthony G. Thevos
f4194c4684
Update docstring (#9340) 2024-03-22 19:37:20 +00:00
Bradley Wells
6df509863d
Add @api_view example to caching documentation (#9131) 2024-03-22 18:33:00 +00:00
Tom Christie
328591693d
Version 3.15.1 (#9339)
* Version 3.15.1
2024-03-22 11:47:50 +00:00
Tom Christie
eb361d289d
SearchFilter.get_search_terms returns list. (#9338) 2024-03-22 10:52:43 +00:00
Asif Saif Uddin
400b4c5441
Revert "Fix NamespaceVersioning ignoring DEFAULT_VERSION on non-None namespac…" (#9335)
This reverts commit 71f87a5864.
2024-03-22 09:39:30 +00:00
Tom Christie
4ef3aaf0ad
Revert #9030 (#9333)
* Revert #9030

* Fix test case
2024-03-22 09:40:34 +01:00
Tom Christie
4f10c4e43e
Revert "Fix Respect can_read_model permission in DjangoModelPermissions (#8…" (#9332)
This reverts commit 0618fa88e1.
2024-03-21 22:45:12 +00:00
Tom Christie
a4d58077a0
Revert "feat: Add some changes to ValidationError to support django style vad…" (#9330)
This reverts commit 4abfa28e08.
2024-03-21 22:26:50 +00:00
Asif Saif Uddin
da78a147f2
Revert "Re-prefetch related objects after updating (#8043)" (#9327)
This reverts commit 2b34aa4291.
2024-03-21 22:23:30 +00:00
Asif Saif Uddin
0e4ed81627
Revert "feat: Add some changes to ValidationError to support django style vad…" (#9326)
This reverts commit 4abfa28e08.

Co-authored-by: Tom Christie <tom@tomchristie.com>
2024-03-21 17:09:43 +01:00
Aristotelis Mikropoulos
56a5b354d0
Add drf-sendables to third-party-packages.md (#9261) 2024-03-21 14:10:10 +00:00
Alex Laird
d7c8dcfc7e
Revert PR that adds autocomplete_fields to TokenAdmin, as this break some use cases. (#9301) 2024-03-21 12:46:06 +00:00
Bruno Alla
77ef27f18f
Fix broken links in release notes for 3.15 (#9305)
* Fix broken links in release notes for 3.15

A few links aren't rendered properly in the docs, seems to be due to extra spaces.

* Remove duplicate mention of PR number
2024-03-19 08:24:55 +01:00
Bruno Alla
2f66c294e3
Make inflection package truly optional (#9303)
* Make inflection package truly optional

Fix #9291

* Make inflection compat layer consistent with the others

Co-authored-by: T. Franzel <13507857+tfranzel@users.noreply.github.com>

---------

Co-authored-by: T. Franzel <13507857+tfranzel@users.noreply.github.com>
2024-03-18 23:29:02 +01:00
Nguyễn Anh Bình
337ba211e8
- Update the message to be consistent with the Django HttpResponseBase class. (#9287) 2024-03-17 14:22:03 +01:00
Tom Christie
2d8e9ad819
3.15 Release (#9210)
* Release Notes for 3.15

- Add docs/community/3.15-announcement.md
- Update docs/community/release-notes.md
- Update mkdocs.yml

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

* Release date pending

bump

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Fix typo

* Changes to tests should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to tests should not be included in release notes.

* Changes to tests should not be included in release notes.

* Fix typo in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to tests should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Improve changelog entry

* Changes to docs should not be included in release notes.

* Changes to docs should not be included in release notes.

* Changes to project workflow should not be included in release notes.

* Changes to docs should not be included in release notes.

* Update docs/community/3.15-announcement.md

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>

* Update docs/community/3.15-announcement.md

* Update docs/community/3.15-announcement.md

* Update docs/community/release-notes.md

* Update docs/community/release-notes.md

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update docs/community/release-notes.md

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update docs/community/3.15-announcement.md

Co-authored-by: JAEGYUN JUNG <twicegoddessana1229@gmail.com>

* Update docs/community/release-notes.md

* Update docs/community/release-notes.md

Co-authored-by: JAEGYUN JUNG <twicegoddessana1229@gmail.com>

* Update release version

* Update supported Python and Django versions

---------

Co-authored-by: Rodrigo <rodrigo@crowdbotics.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: JAEGYUN JUNG <twicegoddessana1229@gmail.com>
2024-03-16 17:21:02 +00:00
Asif Saif Uddin
a677b09729
Revert "Fix validation for ListSerializer (#8979)" (#9283)
This reverts commit e2a4559c03.
2024-03-13 15:15:43 +00:00
TAKAHASHI Shuuji
09a0c551ca
Revert "Register Django urls (#8778)" (#9254)
This reverts commit 3bf611787a.
2024-03-10 12:50:53 +01:00
JAEGYUN JUNG
730d216794
fix: Remove the _delegate_text attribute, which is being removed in django 5.0 (#9278) 2024-03-08 13:14:27 +00:00
şuayip üzülmez
a2eabfc867
Improve integration with Django Debug Toolbar (#9213) 2024-03-07 10:58:59 +01:00