Commit Graph

8307 Commits

Author SHA1 Message Date
Turfa Auliarachman
d784e42207 Fix basename deprecation warnings in tests (#6529) 2019-03-25 10:42:27 -07:00
Patrickcai
b25d245b89 Merge multiple isinstance() calls to one (#6513)
* Merge multiple isinstance() calls to one

See https://docs.python.org/3/library/functions.html#isinstance

* Fix `)` mismatch

Fix `)` mismatch
2019-03-22 12:29:45 +00:00
Ryan Siemens
d2d1888217 Document DateTimeField default_timezone argument (#6469) 2019-03-12 21:15:12 -07:00
Matt Hegarty
6f24c21cfb Fixed typo: /Janurary/January/ (#6506) 2019-03-12 12:46:02 +01:00
Tom Christie
9bfb58746e
Update README.md 2019-03-07 11:02:43 +00:00
Tom Christie
bcdfcf7e49
Sponsor updates (#6495) 2019-03-07 11:00:50 +00:00
Kevin Brown
86c72bb226 Fix schema generation of ManyRelatedField to detect the child type (#6489)
* Introspect ManyRelatedField data type recursively

For all `ManyRelatedField` objects, we were assuming that the inner type was always a `String`. While this may be true for the default output, a `ManyRelatedField` is a wrapper for a lot of other classes which includes more than just strings. This should allow us to document lists of things other than strings.

* Added test for schemas for many-to-many fields

This adds a test that makes sure we generate the schema for a many-to-many field such that it actually has the right type. For some reason we did not previously have any tests for schema generation that included them, so hopefully this will prevent any future issues from popping up.

This should serve as a regression test for the `items` field on to-many relationships, which was previously forced to a `String` even though in most cases it is a different inner type within the array.
2019-03-07 11:26:03 +01:00
Ryan P Kilby
fd32dd7ca4 Explicitly raise exc in 'raise_uncaught_exception' (#6435) 2019-03-07 09:44:20 +00:00
Asif Saif Uddin
9e1e32f678 upgraded pytest dependencies (#6492) 2019-03-07 09:22:00 +00:00
Jon Dufresne
9d06e43d05 Replace type('') with six.text_type (#6482)
As all source files import unicode_literals, type('') is always
equivalent to six.text_type (str on Python 3 and unicode on Python 2).
Removes the need to call type(), is more explicit, and will be easier to
catch places to change for when it is time to eventually drop Python 2.
2019-03-05 12:11:46 +01:00
Luoxzhg
dfc277cce6 Corrected tutorial 1 example renderer output to bytes. (#6486) 2019-03-05 11:50:13 +01:00
SrdjanCosicPrica
ac7b20cca2 Fix get_search_fields example (#6487) 2019-03-04 14:46:14 +01:00
Carlton Gibson
0ab527a3df Updated release notes for v3.9.2 2019-03-03 20:16:16 +01:00
Carlton Gibson
ac4c78967a Update version for v3.9.2 release. 2019-03-03 20:16:16 +01:00
Jon Dufresne
7eac86688a Remove executable bit from static assets (#6484)
These files are simply static assets and do not require an executable
bit. They are never intended to be executed as standalone scripts.
2019-03-03 18:39:08 +00:00
Carlton Gibson
94593b3a50
Introduce RemovedInDRF…Warning classes to simplify deprecations. (#6480)
Closes #6290.
2019-03-03 09:20:45 +01:00
Jon Dufresne
a216d02ce0 Merge multiple isinstance() calls to one (#6481)
https://docs.python.org/3/library/functions.html#isinstance

> If classinfo is a tuple of type objects (or recursively, other such
> tuples), return true if object is an instance of any of the types.
2019-03-02 20:48:03 +00:00
Carlton Gibson
31bf597081 Updated note on BooleanField required kwarg generation.
Closes #6474.
2019-03-01 12:48:12 +01:00
Ramon de Jezus
1dc81acb4d Fixed a typo in pagination docs. (#6475) 2019-02-28 15:18:58 +01:00
Andrzej Górski
317174b163 Avoided calling distinct on annotated fields in SearchFilter. (#6240)
Fixes #6094
2019-02-25 16:59:25 +01:00
Adrien Brunet
2daf6f1341 Add negation ~ operator to permissions composition (#6361) 2019-02-25 15:33:40 +01:00
Xtreak
739b0a272a Fix DeprecationWarning in tests when accessing collections.abc classes via collections (#6473) 2019-02-25 15:22:45 +01:00
Frédéric Massart
94fbfcb6fd Added lazy evaluation to composed permissions. (#6463)
Refs #6402.
2019-02-25 13:47:02 +01:00
Carlton Gibson
8a29c53226 Allowed Q objects in limit_choices_to introspection. (#6472)
Closes #6470.
2019-02-25 10:49:29 +00:00
Charlie Hornsby
07c5c968ce Fix DeprecationWarning when accessing collections.abc classes via collections (#6268)
* Use compat version of collections.abc.Mapping

Since the Mapping class will no longer be available to import directly
from the collections module in Python 3.8, we should use the
compatibility helper introduced in #6154 in the fields module.

* Alias and use compat version of collections.abc.MutableMapping

Since the MutableMapping class will no longer be available to import
directly from the collections module in Python 3.8, we should create an
alias for it in the compat module and use that instead.
2019-02-25 09:17:04 +01:00
Ryan P Kilby
286cf57a8d
Update filtering docs (#6467) 2019-02-22 10:58:01 -08:00
Carlton Gibson
d932baa646
Corrected link to ajax-form library.
Closes #6465.
2019-02-22 11:11:52 +01:00
Allan Reyes
d110454d4c Added SearchFilter.get_search_fields() hook. (#6279) 2019-02-19 17:18:14 +01:00
Si Feng
1ece516d2d Adjusted field validators to accept iterables. (#6282)
Closes 6280.
2019-02-19 16:38:20 +01:00
Carlton Gibson
6de33effd6
Doc’d requirement to implement has_object_permission() (#6462)
…when using provided permission classes.

Closes #6402.
2019-02-19 16:18:55 +01:00
jeffrey k eliasen
eb3180173e Made templates compatible with session-based CSRF. (#6207) 2019-02-19 12:15:03 +01:00
Xavier Ordoquy
1660469ed8
Merge pull request #6460 from michael-k/docs-py3-compat
Fix Python 3 compat in documentation
2019-02-17 22:16:35 +01:00
Michael Käufl
f9401f5ff0
Fix Python 3 compat in documentation 2019-02-16 15:47:13 +01:00
Rohit Gupta
de3929fb33 Add Python 3.7 to classifiers. (#6458) 2019-02-15 10:57:02 +01:00
kuter
e8b4bb1471 Added tests for generateschema management command. (#6442) 2019-02-14 17:51:10 +01:00
Carlton Gibson
65f5c11a5b Document support for Django 2.2. 2019-02-14 15:57:20 +01:00
Carlton Gibson
1c5466eae7 Remove Django 2.2 from allowed failure. 2019-02-14 15:57:20 +01:00
Carlton Gibson
59fcbc6dd5 Add migration for generic relations Tag model. 2019-02-14 15:57:20 +01:00
Carlton Gibson
481ae69df3 Add migration for CustomToken test model.
Move authentication tests to sub-app to enable this.
2019-02-14 15:57:20 +01:00
Carlton Gibson
cb4cbb61f2 Fix search filter tests against Django 2.2.
Django 2.2 enables foreign key constraint checking on SQLite.
2019-02-14 15:57:20 +01:00
Carlton Gibson
606dd49227 Update tox to use Django 2.2b2. 2019-02-14 15:57:20 +01:00
Carlton Gibson
3b996c6dc2
Correct 3rd-party-packages link in issue template.
Closes #6457
2019-02-14 12:01:36 +01:00
Xavier Ordoquy
d23ea30d26
Merge pull request #6454 from johnthagen/patch-1
Fix typo in caching docs
2019-02-14 06:47:31 +01:00
johnthagen
9f66fc9a7c
Fix typo in caching docs 2019-02-13 19:00:16 -05:00
briwa
dc6b3bf42e Fix tutorial instruction to also add pyyaml (#6443) 2019-02-07 09:10:11 +01:00
Tanner Prestegard
abf07e672e Fix throttling documentation for specifying alternate caches (#6446) 2019-02-06 21:26:09 +01:00
carlfarrington
3c5c61f33b fix for a couple of missing words (#6444) 2019-02-06 09:35:04 +00:00
jhtimmins
7c6e34c14f Fix typo: 'what' to 'that' (#6437) 2019-02-02 14:49:58 +01:00
Daniel Roseman
7310411533 Updated example models to use __str__ in relations docs. (#6433) 2019-02-01 19:50:27 +01:00
Carlton Gibson
63e352586b
Drop testing Python 3.5 against Django master. (#6431)
Not supported in Django 3.0.
2019-01-31 17:16:43 +01:00