Xavier Ordoquy
e348ee9255
52 tests passing. Refactored a few string / byte io.
2012-11-23 01:12:33 +01:00
Xavier Ordoquy
b3698acb6c
First passing test under p3k \o/
2012-11-22 00:20:49 +01:00
Stephan Groß
6ba4df8a27
Merge remote-tracking branch 'upstream/master' into regex_field
...
Conflicts:
docs/topics/release-notes.md
2012-11-21 11:56:34 +01:00
Tom Christie
8e8b23b6a9
Merge pull request #430 from j4mie/serializer-method-field
...
Serializer method field
2012-11-20 15:30:30 -08:00
Stephan Groß
86484668f6
added RegexField
2012-11-20 15:38:50 +01:00
Jamie Matthews
de5b071d67
Add SerializerMethodField
2012-11-19 17:22:17 +00:00
Jacob Magnusson
d67ee708e5
Add support for min_length / max_length keywords
...
on basic ModelFields
2012-11-18 18:14:21 +01:00
Tom Christie
e801e21210
Merge pull request #422 from markotibold/max_length_for_modelserializers
...
Max length for modelserializers
2012-11-16 14:54:16 -08:00
Marko Tibold
1a436dd6d9
Added URLField and SlugField.
...
Fixed test_modelserializer_max_length_exceeded
2012-11-16 22:43:16 +01:00
Marko Tibold
403886b79b
Merge commit '3b258d69c92e9d9293f7c5d1690f0ca434e677e3' into file_and_image_fields
2012-11-15 22:48:22 +01:00
Marko Tibold
e112a806d8
.to_native() now returns the file-name.
2012-11-14 21:40:52 +01:00
Marko Tibold
c35b9eb065
Processed review comments.
...
No type checking in .restore_fields()
Added missing BytesIO import.
2012-11-14 21:13:23 +01:00
Stephan Groß
44ff2e0add
fixed some typos
2012-11-14 19:36:29 +01:00
Marko Tibold
8cdbc0a33a
Properly render file inputs in the Browsable api.
2012-11-14 00:09:39 +01:00
Marko Tibold
5443dd5f3c
Added a FileField and an ImageField (copied from django.forms.fields).
...
Adjusted generics, mixins and serializers to take a `files` arg where applicable.
2012-11-13 23:26:17 +01:00
Marko Tibold
2a2ce406bc
Fixes #380
2012-11-10 12:23:19 +01:00
Stephan Groß
f3c94acc4a
fixed typo
2012-11-07 17:19:13 +01:00
Tom Christie
6d3bb67aa6
Add pk_url_kwarg to hyperlinked fields
2012-11-06 17:11:52 +00:00
Stephan Groß
2c52a2581f
added slug support for HyperlinkedIdentityField
2012-11-06 17:02:34 +01:00
Tom Christie
d9be6140dc
More defensive coding. Refs: #348
2012-11-06 11:01:53 +00:00
Tom Christie
0d2377c148
Respect false value defaults on WritableField. Fixes #377 .
2012-11-06 10:55:58 +00:00
Tom Christie
470878a591
Allow slug_url_kwarg to be overidden by subclass. Fixes #373
2012-11-06 10:47:26 +00:00
Tom Christie
867033e676
slug_url_kwarg should default to same as slug_field
2012-11-05 16:43:44 +00:00
Tom Christie
9731b95fc3
Merge pull request #347 from minddust/master
...
support for passing custom slug options to HyperlinkedRelatedField
2012-11-05 08:36:59 -08:00
Stephan Groß
0a660a531a
fixed typo
2012-11-05 16:43:03 +01:00
Stephan Groß
03095f607a
added testcase for custom slug field in hyperlinkedrelatedfield
2012-11-05 16:37:37 +01:00
Tom Christie
33be4b43b9
queryset
argument is now optional on writable model fields.
2012-11-05 12:51:04 +00:00
Stephan Groß
44449fa1f5
Merge remote-tracking branch 'upstream/master'
2012-11-05 11:45:49 +01:00
Tom Christie
5b397e50dd
Include queryset missing exception on writable SlugField
2012-11-05 10:16:23 +00:00
Tom Christie
b468dd6271
Merge pull request #359 from tomchristie/relationship_tests
...
Relationship tests
2012-11-02 14:08:49 -07:00
Tom Christie
8ec54e6a9f
Tweaks
2012-11-02 20:56:51 +00:00
Tom Christie
6eaec7a0ec
foreign key tests
2012-11-02 20:53:33 +00:00
Jacob Magnusson
a6806f0307
Apply to_native on dictionary keys as well
2012-11-02 21:48:16 +01:00
Jacob Magnusson
3de61d200c
Don't convert dictionary into a string representation
2012-11-02 20:55:58 +01:00
Tom Christie
b9bff2a984
Fix issues with pk related fields in the browsable API.
2012-11-02 14:05:14 +00:00
Tom Christie
36e21153fb
Merge master
2012-11-01 23:11:28 +00:00
Tom Christie
d327c5f531
Relational field support in browseable API.
...
Add slug relational fields.
Add quickstart.
2012-11-01 23:04:13 +00:00
Otto Yiu
756297ad1d
fix 'from_native' method when rel is None
...
'NoneType' object has no attribute 'to'
2012-10-31 21:40:20 -07:00
Stephan Groß
ff7725f05e
added support for custom slug field and kwargs
...
without subclassing HyperlinkedRelatedField and overwriting
slug_url_kwarg and slug_field there is no possibility to use other
fields / arguments. now you can do something like this:
url(r'^users/(?P<username>\w[\w-]*)$', UserInstance.as_view(),
name='user-detail')
class ProjectSerializer(serializers.HyperlinkedModelSerializer):
created_by =
serializers.HyperlinkedRelatedField(view_name='user-detail',
slug_url_kwargs='username', slug_field='username')
2012-10-31 15:30:01 +01:00
Tom Christie
cea907f172
Raise nicer exception if queryset not Set on writable related field. Refs: #338
2012-10-30 11:10:23 +00:00
Tom Christie
0047a46020
Merge fixes for 'blank=True' fields. Fixes #324 , Fixes #325
...
Thanks to @Roarster.
2012-10-30 11:03:03 +00:00
Tom Christie
5670cb03bf
Allow use of absolute URLs when deserializing hyperlinked fields
2012-10-30 10:49:01 +00:00
Tom Christie
51a53b497b
Merge pull request #335 from tomchristie/related-field-as-instance
...
Writable related fields should return a model instance from .from_native...
2012-10-30 03:32:55 -07:00
Marko Tibold
4d90bb4af4
Fix some typos.
2012-10-30 00:30:52 +01:00
Tom Christie
d206c686a6
Fixes for urls with suffixes
2012-10-29 17:08:38 +00:00
Tom Christie
49f87cfbab
Deal with None and missing values
2012-10-29 14:10:38 +00:00
Tom Christie
f4edd92566
Writable welated fields should return a model instance from .from_native(), not a pk
2012-10-29 12:51:21 +00:00
Tom Christie
6e4ab09aae
readonly -> read_only
2012-10-28 20:21:45 +00:00
Tom Christie
fc4614a89c
Whitespace
2012-10-26 12:46:41 +01:00
Ian Strachan
c7a0d52fd7
#314 Fix for manytomany field being required in the payload even though the field is specified as readonly in the serializer
2012-10-22 22:24:26 +01:00