Skip to content

Commit 91063d4

Browse files
authored
Merge branch 'main' into master
2 parents 06c3aa5 + 4017239 commit 91063d4

File tree

9 files changed

+55
-50
lines changed

9 files changed

+55
-50
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Some reasons you might want to use REST framework:
3131
# Requirements
3232

3333
* Python 3.10+
34-
* Django 4.2, 5.0, 5.1, 5.2
34+
* Django 4.2, 5.0, 5.1, 5.2, 6.0
3535

3636
We **highly recommend** and only officially support the latest patch release of
3737
each Python and Django series.

docs/api-guide/serializers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ You can override a URL field view name and lookup field by using either, or both
708708
class AccountSerializer(serializers.HyperlinkedModelSerializer):
709709
class Meta:
710710
model = Account
711-
fields = ['account_url', 'account_name', 'users', 'created']
711+
fields = ['url', 'account_name', 'users', 'created']
712712
extra_kwargs = {
713713
'url': {'view_name': 'accounts', 'lookup_field': 'account_name'},
714714
'users': {'lookup_field': 'username'}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ classifiers = [
1818
"Framework :: Django :: 5.0",
1919
"Framework :: Django :: 5.1",
2020
"Framework :: Django :: 5.2",
21+
"Framework :: Django :: 6.0",
2122
"Intended Audience :: Developers",
2223
"Operating System :: OS Independent",
2324
"Programming Language :: Python",
323 Bytes
Binary file not shown.

rest_framework/locale/pt_BR/LC_MESSAGES/django.po

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
# Jonatas Baldin <[email protected]>, 2017
1212
# Gabriel Mitelman Tkacz <[email protected]>, 2024
1313
# Matheus Oliveira <[email protected]>, 2025
14+
# João Victor Pinheiro Reis <[email protected]>, 2025
1415
msgid ""
1516
msgstr ""
1617
"Project-Id-Version: Django REST framework\n"
1718
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2020-10-13 21:45+0200\n"
19-
"PO-Revision-Date: 2020-10-13 19:45+0000\n"
20-
"Last-Translator: Xavier Ordoquy <xordoquy@linovia.com>\n"
19+
"POT-Creation-Date: 2025-11-18 17:00+0300\n"
20+
"PO-Revision-Date: 2025-11-18 14:00+0000\n"
21+
"Last-Translator: João Victor Pinheiro Reis <joaovictorpinheiro1510@gmail.com>\n"
2122
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/pt_BR/)\n"
2223
"MIME-Version: 1.0\n"
2324
"Content-Type: text/plain; charset=UTF-8\n"
@@ -35,11 +36,11 @@ msgstr "Cabeçalho básico inválido. String de credenciais não deve incluir es
3536

3637
#: authentication.py:83
3738
msgid "Invalid basic header. Credentials not correctly base64 encoded."
38-
msgstr "Cabeçalho básico inválido. Credenciais codificadas em base64 incorretamente."
39+
msgstr "Cabeçalho básico inválido. Credenciais não foram corretamente codificadas em base64."
3940

4041
#: authentication.py:101
4142
msgid "Invalid username/password."
42-
msgstr "Usuário ou senha inválido."
43+
msgstr "Usuário ou senha inválidos."
4344

4445
#: authentication.py:104 authentication.py:206
4546
msgid "User inactive or deleted."
@@ -56,7 +57,7 @@ msgstr "Cabeçalho de token inválido. String de token não deve incluir espaço
5657
#: authentication.py:193
5758
msgid ""
5859
"Invalid token header. Token string should not contain invalid characters."
59-
msgstr "Cabeçalho de token inválido. String de token não deve possuir caracteres inválidos."
60+
msgstr "Cabeçalho de token inválido. String de token não deveria possuir caracteres inválidos."
6061

6162
#: authentication.py:203
6263
msgid "Invalid token."
@@ -88,7 +89,7 @@ msgstr "Tokens"
8889

8990
#: authtoken/serializers.py:9
9091
msgid "Username"
91-
msgstr "Nome do usuário"
92+
msgstr "Nome de usuário"
9293

9394
#: authtoken/serializers.py:13
9495
msgid "Password"
@@ -100,11 +101,11 @@ msgstr "Impossível fazer login com as credenciais fornecidas."
100101

101102
#: authtoken/serializers.py:38
102103
msgid "Must include \"username\" and \"password\"."
103-
msgstr "Obrigatório incluir \"usuário\" e \"senha\"."
104+
msgstr "Deve incluir \"username\" e \"password\"."
104105

105106
#: exceptions.py:102
106107
msgid "A server error occurred."
107-
msgstr "Ocorreu um erro de servidor."
108+
msgstr "Um erro de servidor ocorreu."
108109

109110
#: exceptions.py:142
110111
msgid "Invalid input."
@@ -142,21 +143,21 @@ msgstr "Não foi possível satisfazer a requisição do cabeçalho Accept."
142143
#: exceptions.py:212
143144
#, python-brace-format
144145
msgid "Unsupported media type \"{media_type}\" in request."
145-
msgstr "Tipo de mídia \"{media_type}\" no pedido não é suportado."
146+
msgstr "Tipo de mídia \"{media_type}\" não é suportado."
146147

147148
#: exceptions.py:223
148149
msgid "Request was throttled."
149-
msgstr "Pedido foi limitado."
150+
msgstr "Pedido foi suprimido."
150151

151152
#: exceptions.py:224
152153
#, python-brace-format
153154
msgid "Expected available in {wait} second."
154-
msgstr "Disponível em {wait} segundo."
155+
msgstr "Espera-se que esteja diponível em {wait} segundo."
155156

156157
#: exceptions.py:225
157158
#, python-brace-format
158159
msgid "Expected available in {wait} seconds."
159-
msgstr "Disponível em {wait} segundos."
160+
msgstr "Espera-se que esteja diponível em {wait} segundos."
160161

161162
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
162163
#: validators.py:183
@@ -165,7 +166,7 @@ msgstr "Este campo é obrigatório."
165166

166167
#: fields.py:317
167168
msgid "This field may not be null."
168-
msgstr "Este campo não pode ser nulo."
169+
msgstr "Este campo pode não ser nulo."
169170

170171
#: fields.py:701
171172
msgid "Must be a valid boolean."
@@ -177,7 +178,7 @@ msgstr "Não é uma string válida."
177178

178179
#: fields.py:767
179180
msgid "This field may not be blank."
180-
msgstr "Este campo não pode estar em branco."
181+
msgstr "Este campo pode não estar em branco."
181182

182183
#: fields.py:768 fields.py:1881
183184
#, python-brace-format
@@ -201,13 +202,13 @@ msgstr "Este valor não corresponde ao padrão exigido."
201202
msgid ""
202203
"Enter a valid \"slug\" consisting of letters, numbers, underscores or "
203204
"hyphens."
204-
msgstr "Insira um \"slug\" válido que consista de letras, números, sublinhados ou hífens."
205+
msgstr "Insira um \"slug\" válido que consista em letras, números, sublinhados ou hífens."
205206

206207
#: fields.py:839
207208
msgid ""
208209
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
209210
"or hyphens."
210-
msgstr "Insira um \"slug\" válido que consista de letras Unicode, números, sublinhados ou hífens."
211+
msgstr "Insira um \"slug\" válido que consista em letras, números, sublinhados ou hífens Unicode."
211212

212213
#: fields.py:854
213214
msgid "Enter a valid URL."
@@ -268,7 +269,7 @@ msgstr "Formato inválido para data e hora. Use um dos formatos a seguir: {forma
268269

269270
#: fields.py:1149
270271
msgid "Expected a datetime but got a date."
271-
msgstr "Necessário uma data e hora mas recebeu uma data."
272+
msgstr "Esperava data e hora, mas recebeu data."
272273

273274
#: fields.py:1150
274275
#, python-brace-format
@@ -282,11 +283,11 @@ msgstr "Valor de data e hora fora do intervalo."
282283
#: fields.py:1236
283284
#, python-brace-format
284285
msgid "Date has wrong format. Use one of these formats instead: {format}."
285-
msgstr "Formato inválido para data. Use um dos formatos a seguir: {format}."
286+
msgstr "Formato de data inválido. Use um dos formatos a seguir: {format}."
286287

287288
#: fields.py:1237
288289
msgid "Expected a date but got a datetime."
289-
msgstr "Necessário uma data mas recebeu uma data e hora."
290+
msgstr "Esperava data, mas recebeu data e hora."
290291

291292
#: fields.py:1303
292293
#, python-brace-format
@@ -301,7 +302,7 @@ msgstr "Formato inválido para duração. Use um dos formatos a seguir: {format}
301302
#: fields.py:1399 fields.py:1456
302303
#, python-brace-format
303304
msgid "\"{input}\" is not a valid choice."
304-
msgstr "\"{input}\" não é um escolha válida."
305+
msgstr "\"{input}\" não é uma escolha válida."
305306

306307
#: fields.py:1402
307308
#, python-brace-format
@@ -315,12 +316,12 @@ msgstr "Esperava uma lista de itens, mas recebeu tipo \"{input_type}\"."
315316

316317
#: fields.py:1458
317318
msgid "This selection may not be empty."
318-
msgstr "Esta seleção não pode estar vazia."
319+
msgstr "Esta seleção pode não estar vazia."
319320

320321
#: fields.py:1495
321322
#, python-brace-format
322323
msgid "\"{input}\" is not a valid path choice."
323-
msgstr "\"{input}\" não é uma escolha válida para um caminho."
324+
msgstr "\"{input}\" não é uma escolha válida de caminho."
324325

325326
#: fields.py:1514
326327
msgid "No file was submitted."
@@ -329,7 +330,7 @@ msgstr "Nenhum arquivo foi submetido."
329330
#: fields.py:1515
330331
msgid ""
331332
"The submitted data was not a file. Check the encoding type on the form."
332-
msgstr "O dado submetido não é um arquivo. Certifique-se do tipo de codificação no formulário."
333+
msgstr "O dado submetido não era um arquivo. Cheque o tipo de codificação no formulário."
333334

334335
#: fields.py:1516
335336
msgid "No filename could be determined."
@@ -343,7 +344,7 @@ msgstr "O arquivo submetido está vázio."
343344
#, python-brace-format
344345
msgid ""
345346
"Ensure this filename has at most {max_length} characters (it has {length})."
346-
msgstr "Certifique-se de que o nome do arquivo tem menos de {max_length} caracteres (tem {length})."
347+
msgstr "Certifique-se de que o nome do arquivo tenho no máximo {max_length} caracteres (tem {length})."
347348

348349
#: fields.py:1566
349350
msgid ""
@@ -353,7 +354,7 @@ msgstr "Faça upload de uma imagem válida. O arquivo enviado não é um arquivo
353354

354355
#: fields.py:1604 relations.py:486 serializers.py:571
355356
msgid "This list may not be empty."
356-
msgstr "Esta lista não pode estar vazia."
357+
msgstr "Esta lista pode não estar vazia."
357358

358359
#: fields.py:1605
359360
#, python-brace-format
@@ -368,11 +369,11 @@ msgstr "Certifique-se de que este campo não tenha mais que {max_length} element
368369
#: fields.py:1682
369370
#, python-brace-format
370371
msgid "Expected a dictionary of items but got type \"{input_type}\"."
371-
msgstr "Esperava um dicionário de itens mas recebeu tipo \"{input_type}\"."
372+
msgstr "Esperava um dicionário de itens, mas recebeu tipo \"{input_type}\"."
372373

373374
#: fields.py:1683
374375
msgid "This dictionary may not be empty."
375-
msgstr "Este dicionário não pode estar vazio."
376+
msgstr "Este dicionário pode não estar vazio."
376377

377378
#: fields.py:1755
378379
msgid "Value must be valid JSON."
@@ -451,7 +452,7 @@ msgstr "Hyperlink inválido - Objeto não existe."
451452
#: relations.py:283
452453
#, python-brace-format
453454
msgid "Incorrect type. Expected URL string, received {data_type}."
454-
msgstr "Tipo incorreto. Necessário string URL, recebeu {data_type}."
455+
msgstr "Tipo incorreto. Esperava string URL, recebeu {data_type}."
455456

456457
#: relations.py:448
457458
#, python-brace-format
@@ -482,7 +483,7 @@ msgstr "Um {value_type} que identifica este {name}."
482483
#: serializers.py:337
483484
#, python-brace-format
484485
msgid "Invalid data. Expected a dictionary, but got {datatype}."
485-
msgstr "Dado inválido. Necessário um dicionário mas recebeu {datatype}."
486+
msgstr "Dado inválido. Esperava um dicionário, mas recebeu {datatype}."
486487

487488
#: templates/rest_framework/admin.html:116
488489
#: templates/rest_framework/base.html:136
@@ -500,23 +501,23 @@ msgstr ""
500501

501502
#: templates/rest_framework/base.html:75
502503
msgid "content"
503-
msgstr ""
504+
msgstr "conteúdo"
504505

505506
#: templates/rest_framework/base.html:78
506507
msgid "request form"
507-
msgstr ""
508+
msgstr "formulário de requisição"
508509

509510
#: templates/rest_framework/base.html:157
510511
msgid "main content"
511-
msgstr ""
512+
msgstr "conteúdo principal"
512513

513514
#: templates/rest_framework/base.html:173
514515
msgid "request info"
515-
msgstr ""
516+
msgstr "informações da requisição"
516517

517518
#: templates/rest_framework/base.html:177
518519
msgid "response info"
519-
msgstr ""
520+
msgstr "informações da resposta"
520521

521522
#: templates/rest_framework/horizontal/radio.html:4
522523
#: templates/rest_framework/inline/radio.html:3
@@ -528,11 +529,11 @@ msgstr "Nenhum(a/as)"
528529
#: templates/rest_framework/inline/select_multiple.html:3
529530
#: templates/rest_framework/vertical/select_multiple.html:3
530531
msgid "No items to select."
531-
msgstr "Nenhum item para escholher."
532+
msgstr "Nenhum item para selecionar."
532533

533534
#: validators.py:39
534535
msgid "This field must be unique."
535-
msgstr "Esse campo deve ser único."
536+
msgstr "Este campo deve ser único."
536537

537538
#: validators.py:89
538539
#, python-brace-format
@@ -547,17 +548,17 @@ msgstr "Caracteres substitutos não são permitidos: U+{code_point:X}."
547548
#: validators.py:243
548549
#, python-brace-format
549550
msgid "This field must be unique for the \"{date_field}\" date."
550-
msgstr "O campo \"{date_field}\" deve ser único para a data."
551+
msgstr "Este campo deve ser único para a data de \"{date_field}\"."
551552

552553
#: validators.py:258
553554
#, python-brace-format
554555
msgid "This field must be unique for the \"{date_field}\" month."
555-
msgstr "O campo \"{date_field}\" deve ser único para o mês."
556+
msgstr "Este campo deve ser único para o mês de \"{date_field}\"."
556557

557558
#: validators.py:271
558559
#, python-brace-format
559560
msgid "This field must be unique for the \"{date_field}\" year."
560-
msgstr "O campo \"{date_field}\" deve ser único para o ano."
561+
msgstr "Este campo deve ser único para o ano de \"{date_field}\"."
561562

562563
#: versioning.py:40
563564
msgid "Invalid version in \"Accept\" header."
@@ -577,4 +578,4 @@ msgstr "Versão inválida no hostname."
577578

578579
#: versioning.py:170
579580
msgid "Invalid version in query parameter."
580-
msgstr "Versão inválida no parâmetro de query."
581+
msgstr "Versão inválida no parâmetro de consulta."

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def pytest_configure(config):
1515

1616
settings.configure(
1717
DEBUG_PROPAGATE_EXCEPTIONS=True,
18+
DEFAULT_AUTO_FIELD="django.db.models.AutoField",
1819
DATABASES={
1920
'default': {
2021
'ENGINE': 'django.db.backends.sqlite3',

tests/test_templatetags.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
22

33
from django.template import Context, Template
4-
from django.test import TestCase
4+
from django.test import TestCase, override_settings
55
from django.utils.html import urlize
66

77
from rest_framework.compat import coreapi, coreschema
@@ -240,6 +240,7 @@ class Issue1386Tests(TestCase):
240240
Covers #1386
241241
"""
242242

243+
@override_settings(URLIZE_ASSUME_HTTPS=True)
243244
def test_issue_1386(self):
244245
"""
245246
Test function urlize with different args

tests/test_validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def test_single_field_uniq_validators(self):
752752

753753
validators = serializer.fields['fancy_conditions'].validators
754754
assert len(validators) == 2 + extra_validators_qty
755-
ids_in_qs = {frozenset(v.queryset.values_list(flat=True)) for v in validators if hasattr(v, "queryset")}
755+
ids_in_qs = {frozenset(v.queryset.values_list('id', flat=True)) for v in validators if hasattr(v, "queryset")}
756756
assert ids_in_qs == {frozenset([1]), frozenset([3])}
757757

758758
def test_nullable_unique_constraint_fields_are_not_required(self):

tox.ini

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
envlist =
33
{py310}-{django42,django51,django52}
44
{py311}-{django42,django51,django52}
5-
{py312}-{django42,django51,django52,djangomain}
6-
{py313}-{django51,django52,djangomain}
7-
{py314}-{django52,djangomain}
5+
{py312}-{django42,django51,django52,django60,djangomain}
6+
{py313}-{django51,django52,django60,djangomain}
7+
{py314}-{django52,django60,djangomain}
88
base
99
dist
1010
docs
@@ -20,20 +20,21 @@ deps =
2020
django50: Django>=5.0,<5.1
2121
django51: Django>=5.1,<5.2
2222
django52: Django>=5.2,<6.0
23+
django60: Django>=6.0,<6.1
2324
djangomain: https://github.com/django/django/archive/main.tar.gz
2425
-rrequirements/requirements-testing.txt
2526
-rrequirements/requirements-optionals.txt
2627

2728
[testenv:base]
2829
; Ensure optional dependencies are not required
2930
deps =
30-
django<6.0
31+
django<6.1
3132
-rrequirements/requirements-testing.txt
3233

3334
[testenv:dist]
3435
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --no-pkgroot --staticfiles {posargs}
3536
deps =
36-
django<6.0
37+
django<6.1
3738
-rrequirements/requirements-testing.txt
3839
-rrequirements/requirements-optionals.txt
3940

0 commit comments

Comments
 (0)