Commit Graph

8744 Commits

Author SHA1 Message Date
şuayip üzülmez
2ef77b1833
Use POST method instead of GET to perform logout in browsable API (#9208)
* Use POST method instead of GET to perform logout in browsable API

* Add a test that checks the presence of the logout form
2024-02-19 23:28:04 +01:00
Victorien
df89f32b88
Fix typo in 3.14 announcement (#9255) 2024-02-14 11:02:02 +00:00
iamkorniichuk
5ad467aa2c
Remove read_only deprecated behaviour from documentation (#9239) 2024-01-29 09:30:29 +01:00
Yuekui
41edb3b9dd
Avoid unnecessary unique together checking (#9154) 2024-01-26 11:36:18 +01:00
Marcelo Galigniana
2797c0f216
Add missing import in /api-guide/viewsets/ example (#9235) 2024-01-25 12:01:06 +01:00
Christian Clauss
ab694eccde
Fix typo (#9231) 2024-01-24 23:17:01 +01:00
Christian Clauss
74689b1f44
pre-commit autoupdate (#9232) 2024-01-24 22:47:46 +01:00
Kien Dang
f85d8cb81a
Fix comment syntax error in doc that fails pre-commit blacken-docs (#9225)
* Fix comment syntax in doc

* Pre-commit
2024-01-24 22:44:46 +01:00
Kien Dang
552a67acde
Skip coreapi tests in GenerateSchemaTests if coreapi is not installed (#9229) 2024-01-19 11:10:56 +01:00
Viicos
c4f9d432dd
Update 3.11-announcement.md (#9227) 2024-01-18 15:35:57 +01:00
Kien Dang
21bb21b65b
Fix use of ip_address_validators for Django 5.1+ (#9180)
* Fix use of ip_address_validators for Django 5.0+

* Change affected django version to 5.1
2024-01-11 13:34:46 +01:00
Code Apprentice
047bec1288
Add documentation to show how to add authentication for the browseable api (#9137) 2024-01-04 14:16:57 +00:00
Matt George
f4175b4b07
Update quickstart.md (#9185)
add .order_by() to eliminate Pagination UnorderedObjectListWarning
2024-01-04 13:10:53 +00:00
Yousef Abu Shanab
530baa23cd
Add 2 customization packages, rest-framework-redesign and rest-framework-material (#9088) 2024-01-04 12:42:54 +00:00
HGZahn
4c231d5b97
Clarifying the file to edit (#9189) 2024-01-04 12:36:49 +00:00
Asif Saif Uddin
0f39e0124d
Update requirements-optionals.txt (#9181)
* Update requirements-optionals.txt

* Update requirements-optionals.txt
2023-12-06 22:44:47 +06:00
Krishna2864
0abb84fa39
removed hyperlink for web browsable API on homepage (#9174) 2023-11-30 11:07:36 +00:00
Tom Christie
06022e788e
Update README.md 2023-11-29 14:15:53 +00:00
Tom Christie
15f619ade0
Add Svix to sponsors (#9173) 2023-11-29 14:13:36 +00:00
Asif Saif Uddin
1db19f4b2d
Update pytest version in requirements-testing.txt (#9158) 2023-11-05 11:59:10 +06:00
Asif Saif Uddin
f56b85b7dd
Update pygments>=2.12.0,<2.14.0 in requirements-optionals (#9142)
* Update pygments>=2.12.0,<2.16.1 in requirements-optionals

* Update requirements/requirements-optionals.txt

* Update requirements/requirements-optionals.txt

* Update requirements/requirements-optionals.txt
2023-10-17 16:13:10 +06:00
Asif Saif Uddin
2c59206b3e
Update requirements-documentation.txt (#9141) 2023-10-17 15:40:12 +06:00
J.V. Zammit
e794e5e5e4
blacken-docs (#8906)
* blacken-docs: Manual fixes for command to pass without errors

* blacken-docs: Adds blacken-docs step to precommit hook.

* blacken-docs: Adds changes made by command itself.

* blacken-docs: Modifies blacken-docs step to only process files under "docs" directory

* blacken-docs: Updates pre-commit config file to exclude all directories other than "docs" to be compatible with "--all-files" flag.

* blacken-docs: Adds commas at the end to make it look identical to pre-black version
2023-10-13 12:44:45 +01:00
Viicos
18b02ce00e
Add missing DEFAULT_VERSIONING_CLASS entry to API docs (#9126) 2023-10-08 13:30:10 +06:00
Marko
8da6b696ab
docs: update django requirement to 4.2 (#9128) 2023-10-07 14:55:25 +06:00
Michael Herman
d181511155
add courses section to community resources (#8845) 2023-10-05 10:06:07 +01:00
Terence Honles
4296189283
fix dist test by moving --no-pkgroot to runtests.py (#9129)
This change fixes the dist test by moving the --no-pkgroot option from
pytest to the runtests script.

The current "filterwarnings" setting for pytest includes rest_framework,
which causes an early import of the module. As a result the current
--no-pkgroot behavior fails with an assertion error. Trying to remove
the module from sys.modules will cause the warning filter to not apply,
so this change moves this code before pytest parses the config and loads
the "filterwarnings".
2023-10-05 12:33:53 +06:00
Viicos
d32346bae5
Fix type name of FieldInfo namedtuple (#9124)
* Fix type name of `FieldInfo` namedtuple

* Add test
2023-10-04 23:03:10 +06:00
Marcelo Galigniana
605cc4f736
Updated links to CSRF/AJAX Django documentation (#9118) 2023-09-29 15:06:16 +06:00
Asif Saif Uddin
4bbfa8d455
Updated Checkout action version & Ubuntu OS version (#9097)
* Updated Checkout action version & Ubuntu OS version

* Update .github/workflows/main.yml
2023-09-09 13:55:32 +06:00
Asif Saif Uddin
b6e3a22f7c
added jQuery 3.7.1 support & dropped previous version (#9094)
* added jQuery 3.7.1 support & dropped previous version

* added jQuery 3.7.1 support & dropped previous version
2023-09-09 13:51:05 +06:00
Daniel
5a01a4c8a9
Update CONTRIBUTING.md (#9095)
Removed apostrophe from "it's".
2023-08-31 14:19:25 +06:00
Harald Nezbeda
40eccb0d6c
Fixes documentation link test (#9076) 2023-08-17 16:21:03 +06:00
Devid
5c07060ce0
Use str as default path converter (#9066) 2023-08-16 20:11:50 +06:00
Ori Roza
9e05aa5962
Update third-party-packages.md (#9026)
added https://github.com/Ori-Roza/drf-api-action to third packages docs
2023-08-15 11:58:06 +06:00
Pavel Král
a47adbcd0f
Document support for http.HTTPMethod in the @action decorator added in Python 3.11. (#9067)
* Implement tests for HTTPMethod from Python 3.11

* Update documentation to mention HTTPMethod support in @action
2023-08-15 11:50:02 +06:00
Denis Surkov
2843b925f9
Add note for HiddenField behavior (#9055)
* Add note for HiddenField behavior

* Update docs/api-guide/fields.md

* Update docs/api-guide/validators.md

---------

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2023-08-15 11:20:05 +06:00
Harald Nezbeda
a2430a8cce
Add docs validation to release process (#6967)
* Add ci stage to test for broken links in documentation

* Add docs validation to release process

* Update .github/workflows/main.yml

* Update .github/workflows/main.yml

---------

Co-authored-by: Ryan P Kilby <kilbyr@gmail.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2023-08-15 11:17:08 +06:00
rexes-aka
6ebe6f2600
Update exceptions.md (#9071) 2023-08-15 10:56:42 +06:00
Denis Orehovsky
da9288878b
Partial serializer should not have required fields (#7563) 2023-08-13 10:36:19 +06:00
rizwanshaikh
7a9db57eaf
Propagate 'default' from model_field to serializer field. (#9030)
* Propagate 'default' from model_field to serializer field

Fix #7469.

Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>

* updated field default on serializer according to openapi generation and added that to options action response

* added notes regarding default value propagation from model to serializer field

* updated note

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

* Update docs/api-guide/fields.md

---------

Co-authored-by: John Parton <john.parton.iv@gmail.com>
Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
Co-authored-by: Rizwan Shaikh <rshaikh@ces-ltd.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2023-08-07 12:35:54 +06:00
Pierre Chiquet
589b5dca9e
Allow to override child.run_validation call in ListSerializer (#8035)
* Separated run_child_validation method in ListSerializer

* fix typo

* Add test_update_allow_custom_child_validation

---------

Co-authored-by: Pierre Chiquet <pierre.chiquet@ubikey.fr>
2023-07-26 10:27:49 +06:00
Devid
b99df0cf78
Align SearchFilter behaviour to django.contrib.admin search (#9017)
* Use subquery to remove duplicates in SearchFilter

* Align SearchFilter behaviour to django.contrib.admin

* Add compatibility with older django/python versions

* Allow search to split also by comma after smart split

* Use generator to build search conditions to reduce iterations

* Improve search documentation

* Update docs/api-guide/filtering.md

---------

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2023-07-25 19:01:23 +06:00
Amin Aminian
5c3b6e496c
class name added to unkown field error (#9019) 2023-07-25 13:51:25 +06:00
Sergey Klyuykov
7658ffd71d
Fix: Pagination response schemas. (#9049) 2023-07-15 15:26:56 +06:00
Burson
66d86d0177
Fix choices in ChoiceField to support IntEnum (#8955)
Python support Enum in version 3.4, but changed __str__ to int.__str__ until version 3.11 to better support the replacement of existing constants use-case.
[https://docs.python.org/3/library/enum.html#enum.IntEnum](https://docs.python.org/3/library/enum.html#enum.IntEnum)

rest_frame work support Python 3.6+, this commit will support the Enum in choices of Field.
2023-07-13 18:50:49 +06:00
Andrew
4f7e9ed3bb
Fix SearchFilter renders field with invalid value (#9023)
Co-authored-by: Andrii Tarasenko <andrii.tarasenko@py-t.com>
2023-07-02 13:57:20 +06:00
Samiul Sk
8dd4250d02
remove unnecessary line which was causing isort error (#9014) 2023-06-21 11:05:44 +06:00
Samiul Sk
8b7e6f2e34
Update pre-commit.yml (#9012) 2023-06-20 17:43:33 +06:00
rizwanshaikh
9cfa4bd7cc
Fix OpenAPI Schema yaml rendering for timedelta (#9007)
* fix OpenAPIRenderer for timedelta

* added test for rendering openapi with timedelta

* fix OpenAPIRenderer for timedelta

* added test for rendering openapi with timedelta

* Removed usage of field.choices that triggered full table load (#8950)

Removed the `{{ field.choices|yesno:",disabled" }}` block because this triggers the loading of full database table worth of objects just to determine whether the multi-select widget should be set as disabled or not.

Since this "disabled" marking feature is not present in the normal select field, then I propose to remove it also from the multi-select.

* Added Deprecation Warnings for CoreAPI (#7519)

* Added Deprecation Warnings for CoreAPI

* Bumped removal to DRF315

* Update rest_framework/__init__.py

* Update rest_framework/filters.py

* Update rest_framework/filters.py

* Update tests/schemas/test_coreapi.py

* Update rest_framework/filters.py

* Update rest_framework/filters.py

* Update tests/schemas/test_coreapi.py

* Update tests/schemas/test_coreapi.py

* Update setup.cfg

* Update rest_framework/pagination.py

---------

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

* Update copy right timeline

* Fix NamespaceVersioning ignoring DEFAULT_VERSION on non-None namespaces (#7278)

* Fix the case where if the namespace is not None and there's no match,
  NamespaceVersioning always raises NotFound even if DEFAULT_VERSION
  is set or None is in ALLOWED_VERSIONS

* Add test cases

* fix OpenAPIRenderer for timedelta

* added test for rendering openapi with timedelta

* added testcase for rendering yaml with minvalidator for duration field (timedelta)

---------

Co-authored-by: Rizwan Shaikh <rshaikh@ces-ltd.com>
Co-authored-by: Lenno Nagel <lenno@namespace.ee>
Co-authored-by: David Smith <39445562+smithdc1@users.noreply.github.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Konstantin Kuchkov <konstantin.kuchkov@gmail.com>
2023-06-17 09:18:25 +06:00