Commit Graph

2835 Commits

Author SHA1 Message Date
Tom Christie
449ec1d724 Version 3.4.1 [ci skip] (#4326) 2016-07-28 13:34:35 +01:00
Tom Christie
e407dc7f01 Added root_renderers argument (#4323) 2016-07-28 12:50:51 +01:00
Tom Christie
061e0ed084 Added url and schema_url arguments (#4321) 2016-07-28 12:08:34 +01:00
Tom Christie
6a7d34ec34 Unique together checks should apply to fields that are read only, but have a default. (#4316) 2016-07-27 15:40:04 +01:00
Tom Christie
1acbc29d58 Minor style tweak. [ci skip] 2016-07-27 15:39:46 +01:00
Alexander Gaevsky
46a870c002 Fix schema generation for APIView, since it does not have get_serializer_class method. (#4285) 2016-07-27 15:36:36 +01:00
Tom Christie
3586c8a61a Set view.format_kwarg in schema generator (#4315) 2016-07-27 14:43:45 +01:00
Tom Christie
8ebf81b150 Schema support should function when 'pagination_class = None' (#4314) 2016-07-27 13:02:48 +01:00
Tom Christie
351e0a4a99 Fix json indent parameter. Closes #4281 (#4313) 2016-07-27 11:49:01 +01:00
Sassan Haradji
f0f61aa077 use verbose_name instead of object_name in field_mapping (#4299)
* use verbose_name instead of object_name in error messages
2016-07-26 15:12:51 +01:00
Asif Saifuddin Auvi
b63099084f twitter bootstrap minor update (#4307)
* updated bootstrap min css to 3.3.7
* updated bootstrap min javascript to 3.3.7
2016-07-26 14:09:04 +01:00
Gustavo Pantuza
da2ff1bc4a Adding support for RFC 4918 status codes (#4291)
* Added HTTP status codes from RFC 4918

* Updated documentation about status codes

* Added reference to RFC 4918
2016-07-26 11:09:12 +01:00
Andi Albrecht
3ca0b15b17 Restore meta information for each search field. (#4298)
The meta information stored in opts needs to be restored for
each search field. Otherwise it references the wrong model
when an attribute of a related model comes before an attribute
of the original model in search fields. This doesn't apply to
m2m relations since must_call_distinct returns True in that
case.
2016-07-26 11:07:03 +01:00
Aymeric Augustin
a436515196 Add missing return statement.
Fix #4272.
2016-07-16 22:44:49 +02:00
Tom Christie
8385ae42c0 3.4.0 Release (#4258)
* 3.4.0 Release

* Version 3.4 release

* Full release notes

* Update translation files

* Update release documentation

* Update release notes

* Docs on supporting alternate schema formats

* Add schema_renderers to DefaultRouter
2016-07-13 16:30:41 +01:00
Tom Christie
549210b50f Don't strip microseconds in JSON output. (#4256) 2016-07-11 14:34:23 +01:00
Tom Christie
321c060dbe Resolve incorrect media type (#4254) 2016-07-11 12:04:11 +01:00
kiyoqoko
6338ce80ab Add localize keyword argument to DecimalField (#4233)
Add `localize` keyword argument for DecimalField
2016-07-06 16:07:16 +01:00
Tom Christie
6ff9840bde Schemas & client libraries. (#4179)
* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients.
2016-07-04 16:38:17 +01:00
Vikalp Jain
1d2fba906e Fix issues with routers for custom list-route and detail-routes (#4229) 2016-06-29 17:27:17 +01:00
Laurent De Marez
fdde44d9d1 Fix parsing multipart data using a nested serializer with list (#3820)
It is possible that a key in a MultiValueDict has multiple values, lists
are represented this way. When accessing a key in a MultiValueDict
it only returns the last element of that key. This becomes a problem
when parsing an html dict with a list inside of it.

To fix this problem we have to get and set the value using .getlist()
and .setlist().
2016-06-23 16:03:24 +01:00
Tom Christie
bc3485ab7d Namespace versioning with nested namespaces (#4219)
Support nested namespaces with namespaced versioning.
2016-06-23 16:00:11 +01:00
Tom Christie
f81d516ae4 Robust uniqueness checks. (#4217)
* Robust uniqueness checks
* Add master to test matrix (allow_failures)
2016-06-23 15:09:23 +01:00
Tom Christie
e1f7cc4082 Minor refactoring of must_call_distinct (#4215) 2016-06-23 14:02:25 +01:00
Simon Charette
90bb0c58ce Prevented unnecessary distinct() call in SearchFilter. (#3938)
* Prevented unnecessary distinct() call in SearchFilter.

* Refactored SearchFilter lookup prefixes.
2016-06-23 13:49:23 +01:00
Rowan Seymour
36ca4b8e06 Make offset_cutoff a class attribute in CursorPagination so that it can be easily overridden in subclasses (#4212) 2016-06-23 10:37:15 +01:00
Tom Christie
798a971f20 Simplfy TimeField passing through strings (#4197)
* Simplfy TimeField passing through strings
2016-06-14 16:05:00 +01:00
Tom Christie
9406e45b2c Pass through strings as-in with DateTimeField (#4196) 2016-06-14 12:23:39 +01:00
Tom Christie
2e7fae7698 limit=0 should revert to default limit (#4194) 2016-06-13 16:32:43 +01:00
Tom Christie
c3b7fba918 Exclude read_only=True fields from unique_together validation & add docs. (#4192)
* Exclude read_only=True fields from unique_together validation
* Test to ensure that unique_together validators can be removed
* Do not add uniquness_extra_kwargs when validators are explicitly declared.
* Add docs on validation in complex cases
2016-06-13 13:31:12 +01:00
Tom Christie
9bffd35432 Handle bytestrings in JSON. Closes #4185. (#4191) 2016-06-13 10:41:50 +01:00
Tom Christie
bb22ab8ee7 More robust form rendering in the browsable API (#4181) 2016-06-08 17:13:20 +01:00
Tom Christie
a5f822d067 Empty cases of .validated_data and .errors as lists not dicts for ListSerializer (#4180) 2016-06-08 15:55:09 +01:00
Asif Saifuddin Auvi
04e5b5b20a removed AUTH_USER_MODEL compat property (#4176)
Removed unnecessary `AUTH_USER_MODEL` compat variable.

(No longer required)
2016-06-07 12:13:35 +01:00
Sergei Sinitsyn
94863ee6d0 Change serializer field help_text rendering in browsable api (#3812) 2016-06-02 15:21:57 +01:00
Tom Christie
75751cc64e Allow relative style hyperlinked URLs 2016-06-02 15:03:17 +01:00
Tom Christie
9c996d7d2a Clean up existing deprecation warnings. (#4166)
* Add Meta.fields = '__all__' to serializer classes where required.
* Add explicit on_delete=models.CASCADE to ForeignKey fields.
* Use '.remote_field' and '.model' in preference to '.rel' and '.to' when inspecting model fields.
* Use new value_from_object in preference to internal _get_val_from_obj
2016-06-02 14:39:10 +01:00
Tom Christie
05b0c2adff Don't list M2M choices in OPTIONS requests. Refs #3751. (#4160) 2016-06-01 17:28:32 +01:00
Simon Charette
014e24b024 Do not list related field choices in OPTIONS requests.
Do not list related field choices in OPTIONS requests.
2016-06-01 16:33:03 +01:00
Asif Saifuddin Auvi
b92901e591 updated jquery version to 1.12.4 (#4157)
Updated jquery version to 1.12.4
2016-06-01 15:33:36 +01:00
Tom Christie
994e1ba927 Django 1.10 support. (#4158)
* Added TEMPLATES setting to tests
* Remove deprecated view-string in URL conf
* Replace 'urls = ...' in test classes with override_settings('ROOT_URLCONF=...')
* Refactor UsingURLPatterns to use override_settings(ROOT_URLCONF=...) style
* Get model managers and names in a version-compatible manner.
* Apply override_settings to a TestCase, not a mixin class
* Use '.callback' property instead of private attributes when inspecting urlpatterns
* Pass 'user' to template explicitly
* Correct sorting of import statements.
* Remove unused TEMPLATE_LOADERS setting, in favor of TEMPLATES.
* Remove code style issue
* BaseFilter test requires a concrete model
* Resolve tox.ini issues
* Resolve isort differences between local and tox environments
2016-06-01 15:31:00 +01:00
Tom Christie
fe2aede18d More robust default behavior on OrderingFilter (#4156) 2016-06-01 11:08:04 +01:00
KhasanovBI
92bf8b9197 Wrap guardian.VERSION in tuple, in django-guardian 1.4.2 version has list type and comparison fails. (#4149) 2016-05-26 20:22:38 +01:00
Kennedy Mwenja
592eea9b9e * Use get_serializer_class in ordering filter* Test improper configuration of ordering* Raise ImproperlyConfigured when missing get_serializer_class
* Use get_serializer_class in ordering filter
* Test improper configuration of ordering
* Raise ImproperlyConfigured when missing get_serializer_class
2016-05-26 09:59:13 +01:00
Xiao Hanyu
19bdfda49a Fix #3844, refine validator for fields with <source=> kwargs
When serializers has fields with something like `source=user.email`, the
uniqueness validator should check `email` field instead of `user`, cause
`user` is a model object.
2016-05-26 10:58:37 +08:00
Ben Brostoff
400078311b Fix typos in ReturnDict and ReturnList docstrings 2016-05-16 20:39:13 -04:00
KhasanovBI
768ae26aa4 Fix None values representation in childs of ListField, DictField. (#4118) 2016-05-16 09:30:23 +01:00
José Padilla
daccc2b8f3 Clean up js style and remove extra getCookie function (#4123) 2016-05-16 09:27:38 +01:00
José Padilla
5392be4ddb Spring cleaning template styles (#4124) 2016-05-16 09:27:10 +01:00
Alexander Gaevsky
1328982de3 Set proper status code in AdminRenderer for the redirection after POST/DELETE requests. (#4106) 2016-05-16 09:22:28 +01:00