Commit Graph

8842 Commits

Author SHA1 Message Date
tgoddessana
e0842b7724 Feat: add & fix translation for DateTimeField 2024-10-22 17:26:16 +09:00
tgoddessana
70ffca4cda Feat: add & fix translation for DecimalField 2024-10-22 17:24:00 +09:00
tgoddessana
0d6a00cf07 Feat: add missing translation for integer to float error message 2024-10-22 17:14:49 +09:00
tgoddessana
ac7bee839f Fix: add (boolean) for booleanField message 2024-10-22 17:11:21 +09:00
tgoddessana
171cb877dc Feat: add missing translation for UUIDField error message 2024-10-22 17:04:05 +09:00
tgoddessana
73d02471ed Feat: add missing translation for SlugField error message 2024-10-22 17:02:59 +09:00
tgoddessana
cdd6519990 fix: remove unnecessary space 2024-10-22 17:00:56 +09:00
tgoddessana
ce4c58b6bd Add missing translation for CharField, BooleanField messages 2024-10-22 16:59:08 +09:00
tgoddessana
f57e273d70 Add missing translation for throttling messages 2024-10-22 16:50:22 +09:00
tgoddessana
fab9087458 Add missing translation for "Invalid Input" 2024-10-22 16:49:14 +09:00
tgoddessana
4dbfe56423 Fix translation for "Tokens", just like django translation.
reference: 5a91ad3d71/django/contrib/auth/locale/ko/LC_MESSAGES/django.po (L235)
2024-10-22 16:47:42 +09:00
tgoddessana
86716e6771 Fix wrong translation for word "Created" 2024-10-22 16:41:33 +09:00
tgoddessana
548a540144 Add missing translation for the word “Token" 2024-10-22 16:32:44 +09:00
tgoddessana
319d51b734 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)
2024-10-22 16:29:48 +09:00
tgoddessana
bf51b6b113 update django.po translators 2024-10-22 16:27:18 +09:00
tgoddessana
57c37133b1 update django.po file 2024-10-22 16:18:35 +09:00
Gabriel
d3dd45b3f4
Update 1-serialization.md (#9543)
Making explicit the http GET method of the httpie calls.
For some reason it is sending a POST instead of a GET request as it should be described here:
https://httpie.io/docs/cli/optional-get-and-post

Note:
I was following the docs and testing it within the Git Bash windows console app for making the requests and debugging the DRF projenct in pycharm.
2024-10-10 04:41:39 +06:00
Oliver Sauder
10b25e7d63
Use final version of Python 3.13 (#9556)
Final version of Python 3.13 has been released and is now also available on GitHub actions.
2024-10-10 04:39:36 +06:00
Gabriel Mitelman Tkacz
81613c0e51
Fixing and adding pt-br translations (#9535) 2024-09-20 11:34:37 +01:00
Peter Thomassen
9921c7554f
Fix Transifex link (#9541) 2024-09-19 14:11:31 +02:00
Bruno Alla
b25028ac8f
Add support for Python 3.13 (#9527)
* Add support for Python 3.13

* Fix extracting tox env with -dev Python versions

* Fix view description inspection in Python 3.13

Python 3.13 introduced docstrings for None: https://github.com/python/cpython/pull/117813

In Python 3.12, this is an empty string:

```
 ➜ python3.12
Python 3.12.6 (main, Sep 10 2024, 19:06:17) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> d = None
>>> d.__doc__
>>>
```

In Python 3.13, it's no longer empty:

```
 ➜ python3.13
Python 3.13.0rc2+ (heads/3.13:660baa1, Sep 10 2024, 18:57:50) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> d = None
>>> d.__doc__
'The type of the None singleton.'
>>>
```

Adding a check in the inspector that get the view description out the view function docstring to catch this edge case.
2024-09-11 15:39:52 +06:00
Bruno Alla
a59aa2dfe1
Add test covering Update view without queryset attribute (#9528) 2024-09-11 15:37:33 +06: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