Commit Graph

8821 Commits

Author SHA1 Message Date
Bruno Alla
10ea334096
Drop deprecated AutoSchema._get_reference method
As well the unused RemovedInDRF316Warning
2024-09-10 14:12:51 +01:00
Bruno Alla
61e33761eb
Docs: move path converter into a separate section (#9524)
And remove note regarding only working with Django 2.x or above, as it's been a while the feature is present, and DRF only supports Django 4.2+.

I was looking for this but couldn't see it in the docs, having it in a separate section would make it easier to find and link to.

Moreover, as it stands, one might think that the feature is limited to SimpleRouter, while it's also available for DefaultRouter.
2024-09-10 17:29:31 +06:00
Sina Amini
7141bdb2df
Spelling mistakes in Farsi language were corrected (#9521) 2024-09-07 17:30:13 +06:00
Bruno Alla
2ede857de0
Add official support for Django 5.1 (#9514)
* Add official support for Django 5.1

Following the supported Python versions:

https://docs.djangoproject.com/en/stable/faq/install/

* Add tests to cover compat with Django's 5.1 LoginRequiredMiddleware

* First pass to create DRF's LoginRequiredMiddleware

* Attempt to fix the tests

* Revert custom middleware implementation

* Disable LoginRequiredMiddleware on DRF views

* Document how to integrate DRF with LoginRequiredMiddleware

* Move login required tests under a separate test case

* Revert redundant change

* Disable LoginRequiredMiddleware on ViewSets

* Add some integrations tests to cover various view types
2024-09-07 17:21:18 +06:00
Bruno Alla
125ad42eb3
Accept integers as min/max values of DecimalField (#9515)
* Use Decimal for min/max values of DecimalField in tests

* Update docs to mention that min/max values should be Decimal objects

* Accept integer values for DecimalField min and max values

* Update expected error messages in tests

* Update expected warning message in tests
2024-09-07 17:07:28 +06:00
rafaelgramoschi
f593f5752c
Update browsable-api.md (#9509)
* Update browsable-api.md

Deprecated url(), use re_path(). Show imports.

* Update docs/topics/browsable-api.md

* Update docs/topics/browsable-api.md

---------

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2024-08-27 13:44:04 +06:00
Noam
5cc1028c2f
Fix "Converter is already registered" deprecation warning. (#9512) 2024-08-26 17:32:50 +02:00
akkuman
f6ea019bd9
Update django.po (#9505) 2024-08-26 10:31:07 +01:00
Pedro Schlickmann Mendes
2f28e7086d
Update jobs.md (#9480) 2024-08-26 10:28:15 +01:00
Dave Kalu
f113ab6b68
Update tutorials-and-resources.md (#9479)
Included the remaining parts (part 3 and 4) of Andrea Grandi's tutorial on creating production ready APIs with DRF.
2024-08-05 14:26:41 +01:00
Yuekui
518eb22e67
Fix unique_together validation with source (#9482) 2024-08-05 16:36:50 +06:00
James McHugh
8e304e1adb
Fixed AttributeError raised by data property being silently ignored (#9455)
Signed-off-by: James Riley McHugh <mchugh_james@bah.com>
Co-authored-by: James Riley McHugh <mchugh_james@bah.com>
2024-07-17 22:51:39 +06:00
Andrea Grandi
b6ea11028f
Update tutorials-and-resources.md (#9476) 2024-07-17 22:50:09 +06:00
Devid
f74185b6dd
Fix get_template_context to handle also lists (#9467) 2024-07-15 22:03:40 +06:00
Tom Christie
ccfe0a9637
Add Zuplo to sponsors (#9460) 2024-07-05 16:56:58 +01:00
Alvaro Vega
e9f3fd250a
Update release-notes.md (#9451) 2024-06-29 13:48:31 +06:00
Francesco Cataldo
4d0662663a
fix(release-notes): fix wronk link PR(#9435) on release-notes 3.15.2 (#9444)
Co-authored-by: Francesco <francesco.cataldo@spinforward.it>
2024-06-27 13:19:59 +01:00
Martijn Jacobs
7297f19701
Add adrf as a third party package for Django REST framework (#9198) 2024-06-24 10:31:49 +01:00
Devid
e13688f0c0
Remove long deprecated code from request wrapper (#9441) 2024-06-19 00:03:37 +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
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