Commit Graph

8037 Commits

Author SHA1 Message Date
Kevin Brown
e709378ddb Do not extend AND/OR/NOT from BasePermission
This can be done in a separate pull request, but it was reverted out of this one because it made it more difficult to review and increased its chances of not being accepted.
2019-11-13 22:06:47 -05:00
Matías Pierobon
9c3ea30565
Fix tox E302 and E303 2019-06-21 12:31:10 -03:00
Matías Pierobon
88b6200b4b
Fix NameError 2019-06-21 12:19:06 -03:00
Matías Pierobon
db16bb3799
Fix typo at OR constructor
OR members should be the constructors arguments
2019-06-21 12:03:28 -03:00
Matías Pierobon
74855ff383
Let AND and OR operators have multiple members
resolve permission AND(OR(a,b,c), d, e) with logic (a v b v c) ^ d ^ e
2019-06-21 11:54:18 -03:00
Min ho Kim
72de94a05d Fix typos in docs (#6747) 2019-06-18 12:58:01 -07:00
Xavier Ordoquy
809a6acd36 Add --urlconf to the generateschema command (#6696) 2019-06-09 15:23:52 +02:00
Alan Crosswell
4d228257ac Retain declared path ordering in OpenAPI YAML output. (#6680)
* Add pyyaml.dump(..., sort_keys=False) to not sort openapi keys alphabetically
* Retain ordering of paths as provided in urlconf in OpenAPI schemas.
2019-06-09 14:58:02 +02:00
Alan Crosswell
819c46ea80 Add --generator_class CLI option to generateschema (#6735)
* add --generator_class CLI option to generateschema
* Add test for generateschema —generator_class flag.
2019-06-09 14:43:54 +02:00
Alan Crosswell
2d65f82dd7 Generate OpenAPI schema field types from validators. (#6674) 2019-06-09 14:42:56 +02:00
Alan Crosswell
a63860fc8b Corrected openapi.SchemaGenerator path prefixes. (#6724) 2019-06-09 14:29:55 +02:00
Hasan Ramezani
60bcc93202 Remove duplicate test in tests/test_utils.py (#6736) 2019-06-07 14:45:34 +01:00
Ryan P Kilby
9ac9c1b2ea
Update status code docs (#6732) 2019-06-05 17:51:50 -07:00
Tom Christie
6a8575b042
Sponsor update (#6727)
* Sponsor updates

* Sponsor Update
2019-06-04 12:03:31 +01:00
Tom Christie
3135ae86c9
Create FUNDING.yml 2019-06-04 09:00:11 +01:00
Ryan P Kilby
3e210ae48d
Update markdown preprocessor registration (#6722) 2019-05-31 14:11:58 -07:00
Adam
6aac9d2be1 Remove references to django-crispy-forms (#6600) 2019-05-30 19:47:30 -07:00
Jon Dufresne
b37aa284eb Remove unnecessary bytes() calls (#6626) 2019-05-30 15:05:27 -07:00
Florian Wendelborn
6bd25c09a6 Add Multiple HTTP Statuses (#6706) 2019-05-30 14:32:46 -07:00
Timothy Allen
8430f3e5b6 Fix typo in github.com URL. (#6720) 2019-05-30 12:23:37 -07:00
Ran Benita
c2293e9f25 Improve performance of lazy validation message formatting (#6709) 2019-05-29 11:32:03 -07:00
Rodolfo Carvalho
62ed1f8270 Use yaml.safe_load instead of load (#6719)
Use of PyYAML's yaml.load function without specifying the Loader
parameter has been deprecated, see https://msg.pyyaml.org/load.

Earlier versions of PyYAML already had the alternative safe_load
function, which limits the loader to a subset of YAML constructs, that
is enough for what we need here.

Fixes #6677
2019-05-29 09:51:24 -07:00
Monte Hellawell
063f0de949 Move security information to the GitHub security tab (#6716)
* Create SECURITY.md

* Update security policy links in README.md
2019-05-29 09:57:07 +01:00
Dani Hodovic
10a0b42b74 Add more DRF job sites (#6691) 2019-05-24 12:50:15 +01:00
Raffaele Salmaso
514033815d Allow JSONField encoder customization. (#6713) 2019-05-24 12:47:35 +01:00
Mathieu Pillard
afb678433b Always call all throttling classes on the view when checking throttles (#6711) 2019-05-23 14:42:29 +01:00
Ryan P Kilby
19ca86d8d6
Fix lazy translation of ListField errors (#6708)
* Test init for fields w/ lazy translations
* Fix lazy translations for ListField
2019-05-22 19:41:53 -07:00
Florian Wendelborn
0d0e7c3ae0 Add HTTP 308 Permanent Redirect (#6693) 2019-05-22 11:25:12 -07:00
Ryan P Kilby
db37512a6e
Remove 3.10 deprecations (#6687)
* Remove DjangoObjectPermissionsFilter
* Remove detail_route/list_route
* Bump deprecation warning versions
2019-05-21 10:36:55 -07:00
Ran Benita
ccd9b71c0a Don't cache _readable_fields and _writable_fields (#6689)
It might be useful for a serializer with many many fields which uses
read_only and write_only on a large percentage of the fields. But the
memory usage and statefulness it adds are not worth it for the common
case.
2019-05-21 15:45:31 +01:00
Ryan P Kilby
1b8141a4aa
Fix nullable source='*' fields (#6659) 2019-05-20 14:58:02 -07:00
Rick van Hattem
2c92548963 Made the loading of the fund sidebar async (#6686) 2019-05-20 16:09:23 +01:00
Ran Benita
7232586c7c Simplify Serializer.fields with @cached_property (#6662) 2019-05-20 14:49:47 +01:00
Joachim Jablon
43a9cc1b7a Fix CursorPagination when objects get deleted between calls (#6504) (#6593)
* Added regression tests (#6504)

Co-Authored-By: Tom Quinonero <tq@3yourmind.com>

* Fix CursorPagination when objects get deleted between calls (#6504)

Co-Authored-By: Tom Quinonero <tq@3yourmind.com>
2019-05-20 14:41:31 +01:00
Asif Saif Uddin
ac0f0a1774 Updated optional requirements (#6673) 2019-05-14 10:14:11 -07:00
Ryan P Kilby
c3a13916d2
Update release notes (#6671)
* Add 3.9.4 release notes to master
* Add top-level symlink to release notes
2019-05-14 10:13:14 -07:00
Carlton Gibson
37f210a455
Added OpenAPI Schema Generation. (#6532)
Co-authored-by: Lucidiot <lucidiot@protonmail.com>
Co-authored-by: dongfangtianyu <dongfangtianyu@qq.com>
2019-05-13 16:07:03 +02:00
Asif Saif Uddin
a91e6a0e69 Updated test packges version (#6665) 2019-05-13 09:21:27 +01:00
Ran Benita
9811a29a5a Pass through memo in __deepcopy__ as required by the docs (#6660)
This is needed to avoid problems with recursive loops. See
https://docs.python.org/3.7/library/copy.html
toward the end.
2019-05-09 09:20:32 +01:00
gaetano-guerriero
a7c577cb31 Dict field allow empty (#6583)
* dict field: support allow_empty option

* document ListField allow_empty option

* document HStoreField allow_empty parameter
2019-05-09 09:18:20 +01:00
Tim Gates
564faddb0f Make Markdown 2.6 the minimum compatible version (#6576) 2019-05-08 19:34:38 -07:00
Xavier Ordoquy
2e7ab9d6c6
Merge pull request #6654 from jorrit-wehelp/patch-1
Fix test with STRICT_JSON setting
2019-05-08 18:14:27 +02:00
Jorrit
3a21b390ff
Fix test with STRICT_JSON setting
Test is not overriding the intended setting, should be nested inside settings.REST_FRAMEWORK
2019-05-08 16:48:45 +02:00
Andreu Vallbona Plazas
be5a9f78f3 Added note on serializing extra fields from Through Model (#6652)
* adding small clarification on ManyToManyFields with a Through Model

As pointed here: https://github.com/encode/django-rest-framework/pull/6585#issuecomment-490145334 I suggest to add the small clarification to work with **ManyToManyFields with a Through Model**.

* Remove blank line.
2019-05-07 20:01:24 +02:00
Serkan Hosca
680ed8aa8b Add django-rest-witchcraft to third party packages (#6587) 2019-05-06 16:19:51 -07:00
Asif Saif Uddin
50a24d6d7f Drop Python 3.4 support (#6620) 2019-05-06 11:35:58 -07:00
Aart Goossens
0f819d844d Remove recommendation for DRF Docs (#6580)
Since DRF Docs is not compatible with the latest version of DRF (or Django?; related issue: https://github.com/manosim/django-rest-framework-docs/issues/180) and the latest release is almost 3 years ago I suggest to remove the recommendation for this package.
2019-05-03 15:26:06 -07:00
Jimmy Merrild Krag
14fad0d690 Fix capitalization, markdown syntax link in docs (#6621)
The `Pygments` and `Markdown` python packages have first letter capital.
Fixed link to markdown syntax to go directly to the syntax page.
2019-05-02 18:17:33 -07:00
Jon Dufresne
1e519486e1 Fixup isort command/config (#6639) 2019-05-01 17:42:10 -07:00
Afnarel
67d2eabd6c Fix username in template for custom user models (#6612) 2019-05-01 17:23:23 -07:00