Tom Christie
5e39e159ee
UNICODE_JSON and COMPACT_JSON settings
2014-09-12 11:38:22 +01:00
Tom Christie
250755def7
Clean up relational fields queryset usage
2014-09-12 10:59:51 +01:00
Tom Christie
0d354e8f92
to_internal_value() and to_representation()
2014-09-12 09:49:35 +01:00
Tom Christie
adcb64ab41
MethodField -> SerializerMethodField
2014-09-12 09:12:56 +01:00
Tom Christie
1e53eb0aa2
DecimalFields should still be quantized even without coerce_to_string
2014-09-11 21:57:32 +01:00
Tom Christie
040bfcc09c
NotImplemented stubs for Field, and DecimalField improvements
2014-09-11 21:48:54 +01:00
Tom Christie
de301f3b66
Merge master
2014-09-11 13:20:44 +01:00
Tom Christie
80ba047347
Compat fixes
2014-09-10 16:57:22 +01:00
Tom Christie
01c8c0cad9
Added help_text argument to fields
2014-09-10 13:52:16 +01:00
Tom Christie
234369aefd
Tweaks
2014-09-10 08:53:33 +01:00
Tom Christie
b1c07670ca
Fleshing out serializer fields
2014-09-09 17:46:28 +01:00
Tom Christie
21980b800d
More test sorting
2014-09-08 14:24:05 +01:00
Christopher Adams
613a301a36
Fixed #1533 - Resolved issue with integer keys on nested choices never validating.
...
- Added unit test for nested `choices` argument.
- Added unit test for non-nested `choices` argument.
2014-09-06 17:13:28 -04:00
Tom Christie
d934824bff
Workin on
2014-09-05 16:29:46 +01:00
Piotr Jakimiak
c3b841ae44
Use Serializer instead of ModelSerializer
2014-09-05 14:08:11 +02:00
Piotr Jakimiak
6022b9ddd4
Fix comment
2014-09-05 12:00:17 +02:00
Piotr Jakimiak
d9633c6817
Fix returning None when allow_none is True in CharField
2014-09-05 11:08:34 +02:00
Tom Christie
f2852811f9
Getting tests passing
2014-09-02 17:41:23 +01:00
Tom Christie
ec096a1cac
Add relations and get tests running
2014-09-02 15:07:56 +01:00
Tom Christie
4ac4676a40
First pass
2014-08-29 16:46:26 +01:00
Tom Christie
63d02dbea8
Drop six from compat. 1.4.2 is now the lowest supported version.
2014-08-19 17:06:55 +01:00
Tom Christie
d2795dd26d
Resolve linting issues
2014-08-19 13:54:52 +01:00
Xavier Ordoquy
4876bec9f5
Merge remote-tracking branch 'origin/master' into 2.4.0
...
Conflicts:
rest_framework/fields.py
2014-07-26 00:06:56 +02:00
Serhiy Voyt
3326ddc865
Merge branch 'master' into modelserialization-charfield-with-null
2014-06-27 18:10:50 +03:00
Xavier Ordoquy
2489e38a06
Merge remote-tracking branch 'origin/master' into 2.4.0
...
Conflicts:
.travis.yml
docs/api-guide/viewsets.md
rest_framework/serializers.py
rest_framework/throttling.py
tests/test_generics.py
tests/test_serializers.py
tox.ini
2014-06-23 14:02:45 +02:00
TankorSmash
544183f64f
typo in the docs
2014-06-16 19:13:02 -04:00
khamaileon
08c4594145
Replace ChoiceField type_label
2014-06-05 12:49:02 +02:00
John Spray
04c820b8e5
fields: allow help_text on SerializerMethodField
...
...by passing through any extra *args and **kwargs
to the parent constructor.
Previously one couldn't assign help_text to a
SerializerMethodField during construction.
2014-05-22 15:24:35 +01:00
Tom Christie
218b94e606
Merge pull request #1536 from Ian-Foote/choicefield_blank_display_value
...
Allow customising ChoiceField blank display value
2014-05-20 16:03:51 +01:00
Carlton Gibson
d69d975015
Merge pull request #1564 from alumni/master
...
Fixes #1535 (HTML widget missing `id` attribute)
2014-05-09 10:36:06 +02:00
Carlton Gibson
591d5240da
Merge pull request #1575 from ewdicus/iso8601
...
Add colon to time zone offset in readable_datetime_formats
2014-05-08 09:34:06 +02:00
Elliott
11115fde9c
Add colon to time zone offset in readable_datetime_formats
2014-05-07 11:37:20 -07:00
Serhiy Voyt
27be31bd8a
In case of None value returns empty string instead of NoneType.
2014-05-07 18:37:08 +03:00
Serhiy Voyt
1ce1f387b0
Charfied from_native method returns default instead of None. Updated tests.
2014-05-06 21:57:25 +03:00
Lucian Mocanu
4e33ff05d9
Automatically set the field name as value for the HTML id
attribute on the rendered widget.
2014-05-04 00:12:08 +02:00
Xavier Ordoquy
56b4390316
Merge remote-tracking branch 'origin/master' into 2.4.0
...
Conflicts:
.travis.yml
rest_framework/serializers.py
rest_framework/tests/test_authentication.py
2014-04-30 22:21:26 +02:00
Kamil Niski
82094554e5
Minor typo
2014-04-27 02:54:47 +02:00
Ian Foote
6c108c459d
Allow customising ChoiceField blank display value
2014-04-16 12:32:04 +01:00
Xavier Ordoquy
d08536ad9d
Merge remote-tracking branch 'origin/master' into 2.4.0
...
Conflicts:
.travis.yml
docs/api-guide/fields.md
docs/api-guide/routers.md
docs/topics/release-notes.md
rest_framework/authentication.py
rest_framework/serializers.py
rest_framework/templatetags/rest_framework.py
rest_framework/tests/test_authentication.py
rest_framework/tests/test_filters.py
rest_framework/tests/test_hyperlinkedserializers.py
rest_framework/tests/test_serializer.py
rest_framework/tests/test_testing.py
rest_framework/utils/encoders.py
tox.ini
2014-04-13 00:05:57 +02:00
Mauro de Carvalho
2a1571b3bf
Fixed comment.
2014-04-07 18:27:59 -03:00
Anton Shutik
1addd09e2b
RelatedField default value handling fixed
2014-02-27 18:34:36 +03:00
Carlton Gibson
f1016441f5
Test and fix for #1210 . World's lowest hanging fruit.
2014-02-11 19:52:32 +01:00
Tom Christie
e9fda70b4a
Nicer write_only fields implementation. Closes #1355
2014-01-15 08:53:23 +00:00
Tom Christie
85d74fc86a
Added write_only and write_only_fields. Refs #1306
2014-01-14 11:25:44 +00:00
Yuri Prezument
6e622d644c
CharField - add allow_null argument
2014-01-12 10:53:54 +02:00
Yuri Prezument
e88e3c6ae1
Possible fix for #1330
...
Coerce None to '' in CharField.to_native()
2014-01-12 10:53:54 +02:00
Tom Christie
52686420f4
Merge branch 'bennbollay-patch-1' into 2.4.0
...
Conflicts:
.travis.yml
docs/api-guide/routers.md
rest_framework/compat.py
tox.ini
2013-12-23 09:48:59 +00:00
Kevin Brown
90edcbf938
Fix default values always being False for browsable API
...
This fixes a bug that was introduced in 28ff6fb
[1] for the
browsable API, specifically with how it handled default values
for boolean fields. Previously, it had a global default for
boolean fields set to `False`, which was different than the
standard None that was used elsewhere. Because this only needed
to be done for the browsable API, a fix was put into place that
only set the default to `False` when form data was passed into
the serializer. This had the unintended side effect of overriding
any default set on the boolean field.
This fixes #1101 [2] by only overriding the default if the default is
`None`, which is the default for all fields.
[1]: 28ff6fb1ec
[2]: https://github.com/tomchristie/django-rest-framework/issues/1101
2013-12-13 13:20:29 -05:00
Tom Christie
9c41c007af
Merge branch 'master' into 2.4.0
...
Conflicts:
.travis.yml
docs/api-guide/routers.md
docs/topics/release-notes.md
rest_framework/compat.py
2013-12-13 16:32:34 +00:00
Tom Christie
344cd865ab
Merge pull request #1250 from Ian-Foote/choice_field
...
Add choices to options metadata for ChoiceField.
2013-12-03 08:03:02 -08:00