Commit Graph

6804 Commits

Author SHA1 Message Date
Tom Christie
1c5dfc9c8d Merge pull request #3821 from zwernberg/master
update copyright 2016
2016-01-11 16:25:11 +00:00
Zach Wernberg
04b2f021a6 update copyright 2016 2016-01-11 08:13:07 -06:00
Xavier Ordoquy
efe2c3739d Merge pull request #3809 from areski/fix-timefield
Fixed TimeField not handling empty values
2016-01-11 12:28:28 +01:00
areski
4e01796303 Test for TimeField not handling empty values 2016-01-11 12:16:26 +01:00
areski
a76c3ed051 Fixed TimeField not handling empty values 2016-01-11 12:14:40 +01:00
Xavier Ordoquy
edd9c7de02 Merge pull request #3819 from m1kola/bug/DateField-to_representation-unicode-compatibility
PY2: DateField.to_representation can't work with unicode value
2016-01-11 11:29:50 +01:00
Mikalai Radchuk
6b207d93d6 DateField.to_representation unicode compatibility 2016-01-11 13:11:01 +03:00
José Padilla
057cf13578 Merge pull request #3815 from atombrella/keys_dict_3786
Fixes #3786
2016-01-09 22:47:53 -04:00
Xavier Ordoquy
69fb34b0db Merge pull request #3810 from jerel/patch-1
Added documentation for the third party jsonapi.org package
2016-01-07 21:11:59 +01:00
Jerel Unruh
f71d8afdb0 Added documentation for the Third Party jsonapi.org package 2016-01-07 13:42:02 -06:00
Tom Christie
f01a3d9c36 Merge pull request #3801 from koordinates/fix-nested-validation-error
Fix nested validation error being rendered incorrectly.
2016-01-07 09:22:23 +00:00
Mads Jensen
d4cdb21de9 Fixes #3786
Minor fix for dictionary key lookup in settings file
2016-01-06 22:51:11 +01:00
Tom Christie
f7025cf5e5 Merge pull request #3805 from kewama/issue-3804
Fixes #3804, avoiding update of Meta.extra_kwargs
2016-01-06 20:25:00 +00:00
Kevin Massey
7cd3933144 Fixes #3804, avoiding update of Meta.extra_kwargs
Added unit test to cover.
2016-01-06 15:04:51 -05:00
Xavier Ordoquy
c46ed66d0a Merge pull request #3803 from m1kola/patch-1
Typo fix in docs/api-guide/relations.md
2016-01-06 16:02:16 +01:00
m1kola
5fa8a31855 Typo fix in docs/api-guide/relations.md
`slug field` in code snippet was replaced to `slug_field`
2016-01-06 17:58:45 +03:00
Craig de Stigter
651319e2da Fix nested validation error being rendered incorrectly.
Previously an extra list wrapped nested validation errors raised from serializer's validate() methods.
That was inconsistent with the format of validation errors raised by validate_<fieldname> methods.
i.e. these two resulted in *different* behaviour:

    def validate_foo(self):
        raise ValidationError(['bar'])

    def validate(self):
        raise ValidationError({'foo': ['bar']})
2016-01-06 16:05:43 +13:00
Tom Christie
37f7b76f72 Merge pull request #3785 from sheppard/authtoken-import
don't import authtoken model until needed
2016-01-05 17:28:48 +00:00
S. Andrew Sheppard
4f40714169 fix import order 2016-01-05 10:20:22 -06:00
S. Andrew Sheppard
2b8c036b48 test custom token model 2016-01-05 09:58:16 -06:00
S. Andrew Sheppard
1712c00001 update invalid token case 2016-01-05 09:42:22 -06:00
Xavier Ordoquy
dceb686700 Merge pull request #3774 from tomchristie/decimalfield_validators
Min/MaxValueValidator is no longer transferred from a model's DecimalField
2016-01-04 16:36:44 +01:00
Kevin Brown
a772326112 Merged two DecimalValidator tests together
These two tests were previously added in
7d79cf35b7
but we have now discovered that there are not actually two separate
cases, there was just a  bug in the code that made it look that way.

This also removes a redundant check to see if `DecimalValidator` was
defined.
2016-01-04 10:22:17 -05:00
Xavier Ordoquy
060444d89f Merge pull request #3791 from craigglennie/patch-1
Make code block consistent in serialization tutorial
2016-01-04 08:00:13 +01:00
craigglennie
2d7d3b79a0 Make code block consistent in serialization tutorial
All the other code blocks in the Serialization tutorial can be copied and pasted, but there is one that includes the >>> shell prompt characters. This commit removes those characters, and also makes the output consistent with other code blocks by making it a comment.
2016-01-02 13:15:25 -08:00
Xavier Ordoquy
dafbe65ff6 Merge pull request #3787 from Cheglader/issue_3636
Initial fixes #3636 and fixes #3637
2016-01-01 11:11:42 +01:00
Luis San Pablo
183f8fad44 Class formatting 2015-12-31 21:18:41 -06:00
Luis San Pablo
ef491685a0 Initial fixes #3636 and fixes #3637 2015-12-31 21:14:57 -06:00
S. Andrew Sheppard
ff29fdd875 don't import authtoken model until needed 2015-12-30 15:44:19 -06:00
Tom Christie
af0ea8ef51 Merge pull request #3771 from robromano/master
Add HTTP status code 451 to status.py
2015-12-29 09:59:48 +00:00
Leonid Shvechikov
ff0292a757 Fix update model example in html-and-forms.md 2015-12-27 17:14:33 +03:00
Kevin Brown
d797389cf7 Fixed broken test for Django < 1.9
This test was incorrectly checking that there were no validators set in
older versions of Django, even though it should have been checking for
the two validators that were set up on the model field level.

The originally regression test that this fixes was added in
7d79cf35b7
when fixing an issue with the `DecimalValidator`.
2015-12-24 18:17:58 -05:00
Kevin Brown
87605e1e39 Don't filter out the DecimalValidator if it is not supported
Previously, all validators set on a DecimalField in Django would be
stripped when converted to a Django REST framework field. This was
because any validator that was an instance of `DecimalValidator` would
be removed, and when `DecimalValidator` wasn't supported (so it was
`None`), all validators would be removed.

This fixes the issue by only removing the `DecimalValidator` instances
if the `DecimalValidator` is supported.
2015-12-24 14:10:48 -05:00
Kevin Brown
9bab640b0a Added tests for min_value and max_value on a DecimalField
This adds tests for a regression where the `min_value` and `max_value`
arguments are not being set for a DRF `DecimalField` even though the
corresponding `MinValueValidator` and `MaxValueValidator` is being set
on the model fields.

Note that this only appears to be a regression for Django < 1.9, as
these regression tests pass on newer versions of Django.
2015-12-24 14:00:49 -05:00
Robert Romano
c8915c0716 Change tab to spaces 2015-12-23 12:58:14 -08:00
Robert Romano
5fc938cbd1 The Internet Engineering Task Force approved the new HTTP status code 451. Adding to status.py and docs appropriately. 2015-12-23 12:54:17 -08:00
Tom Christie
2d27d9a10a Merge pull request #3769 from mlissner/master
Fixes #3756, adding the name to the HTML title, if it exists.
2015-12-23 16:58:29 +00:00
Michael Lissner
f15026be10 Fixes #3756, adding the name to the HTML title, if it exists. 2015-12-22 10:31:18 -08:00
José Padilla
503687d868 Merge pull request #3765 from linovia/feature/fix_guardian_for_dj_19
Update the Django-guardian version for Django 1.9
2015-12-21 16:59:03 -04:00
Xavier Ordoquy
c5003e8dc1 Update the Django-guardian version for Django 1.9 2015-12-21 18:02:24 +01:00
Tom Christie
ce77ed81df Merge pull request #3762 from ekonstantinidis/add-drf-docs
Add DRF docs to "Documenting your API"
2015-12-21 16:47:44 +00:00
Emmanouil Konstantinidis
1925ec7d33 Both are highly recommended 2015-12-21 13:59:05 +00:00
Emmanouil Konstantinidis
4204557bc5 Remove title and hr 2015-12-21 13:55:11 +00:00
Emmanouil Konstantinidis
958290724c Rest is "REST" 2015-12-21 13:47:04 +00:00
Emmanouil Konstantinidis
a83cb1d2f3 Minor changes 2015-12-21 13:45:11 +00:00
Emmanouil Konstantinidis
1aedaafba4 Add DRF docs to the list 2015-12-21 13:40:23 +00:00
Xavier Ordoquy
5ddfb25fbc Merge pull request #3758 from toolness/patch-1
Update bootstrap version in browsable-api.md
2015-12-19 17:17:06 +01:00
Atul Varma
66de876dee Update bootstrap version in browsable-api.md 2015-12-19 10:34:39 -05:00
Tom Christie
18cdfcd712 Merge pull request #3731 from mjparker777/master
Issue 3726 DateTimeField not handling empty values
2015-12-18 11:27:12 +00:00
Tom Christie
61e7f7b0cc Merge pull request #3715 from Cheglader/settings_errors
Raise error when setting a removed rest_framework setting for #3644
2015-12-18 11:19:06 +00:00