Sébastien Piquemal
89e1cae28e
better Resource.get_model and Resource.get_queryset methods (directly inspired from generic.DetailView)
2012-01-09 20:05:55 +02:00
Sébastien Piquemal
3a52c213f9
made changes requested by Tom. In resources : removed decorators, and 'request' parameter from the crud methods
2012-01-09 20:00:18 +02:00
Tom Christie
d1c217523b
Start separating out serializers
2012-01-06 13:26:21 +00:00
Sébastien Piquemal
926059dad6
new-style resources + tests
2012-01-03 19:17:25 +02:00
Sébastien Piquemal
d987b745f9
started resource-agnostic views
2012-01-03 11:59:56 +02:00
Sébastien Piquemal
9dbe8b646e
ran the tests and made some corrections to the merging
2012-01-03 11:10:14 +02:00
Sébastien Piquemal
59e6cd9892
merged master into experimental
2012-01-03 11:02:46 +02:00
Michael Ding
c7b9100f19
change the key name "field-errors" to "field_errors".
...
as "-" is not allowed as a part of key name in javascript
2011-12-30 22:52:01 +08:00
Tom Christie
07349597ab
whitespace fixes
2011-12-29 13:31:12 +00:00
Tom Christie
db6df5ce61
Drop .as_tuple()
2011-12-14 14:45:59 +00:00
Tom Christie
e8126c3a91
Getting more resourceful - read, create, update and delete methods on ModelMixin
2011-12-14 10:48:19 +00:00
Tom Christie
0542382489
Merge pull request #57 from ulmus/master
...
Fixed documentstring misalign in ModelResource
2011-08-04 04:42:21 -07:00
Danilo Bargen
e3c00e4c1e
Fixed TypeError that occurs without request data.
...
If no request data gets sent, allowed_extra_fields is a set and can't be joined to a tuple using the + operator.
2011-07-27 18:32:19 +03:00
Jens Alm
7dcd2738a5
Fixed misaligned documentation on ModelResource.
...
Added basic documentation for nested resources
Signed-off-by: Jens Alm <jens.alm@mac.com>
2011-07-19 22:09:35 +02:00
Jens Alm
88fa45edc2
Fixed __init__ arguments on ModelResource
...
Signed-off-by: Jens Alm <jens.alm@mac.com>
2011-07-19 00:07:00 +02:00
Fernando Zunino
60cd5363ab
FIX: ModelViews can have Resources whose models have unique fields.
...
ReadModelMixin and UpdateModelMixin store model instance as a property. This allows ModelResource to bind the ModelForm using the model instance making the form validate the input data against the model instance and not a brand new instance. When the latter happened and the model used unique fields, the form validation failed whenever a PUT was maintaining the previuos value of the unique field.
2011-07-01 03:32:04 -03:00
Tom Christie
d3024ff181
Try to be marginally less awful if we can't reverse resolve the URL for a model. TODO: Give up on even trying to do such black magic in the first place?
2011-06-25 17:13:32 +01:00
Tom Christie
7dcb851c7f
Allow related models to be fully serialized
2011-06-15 14:09:01 +01:00
Tom Christie
412b5fc2d5
Support for nesting resources etc...
...
--HG--
rename : djangorestframework/tests/resources.py => djangorestframework/tests/serializer.py
2011-06-14 18:22:13 +01:00
Tom Christie
ebc5a9974d
Fix file uploads
2011-06-12 20:23:40 +01:00
Alen Mujezinovic
06177b8d4b
bound_form.cleaned_data
already returns the file data if there was any.
...
`bound_form.files` returns a `MultiValueDict` which errors when passing
`.CONTENT` into a model constructor.
2011-06-10 12:36:04 +01:00
Alen Mujezinovic
253663aee8
Added possibility to specify what attributes of ForeignKeys and OneToOne fields to include via nested tuples
2011-06-08 15:45:04 +01:00
Tom Christie
bf9ea978bc
Updating docs for 0.2
2011-06-02 15:22:14 +01:00
Tom Christie
bb5b0eb80a
strip _accept when validating
2011-05-27 16:12:03 +01:00
Tom Christie
21d2dcc294
Allow .form specified on view. Allow get_form, put_form, post_form. Add .PARAMS.
2011-05-27 14:40:19 +01:00
Tom Christie
cefc6a25c2
forms/models can be set on the view as well as the resource
2011-05-27 09:58:21 +01:00
markotibold
82c4ca9612
The core is now documented from the docstrings in the source.
2011-05-19 19:36:30 +02:00
Tom Christie
3039f6f6c2
validators tests -> resources tests
2011-05-16 16:52:39 +01:00
Tom Christie
1e04790d50
Fixing some of the last blocking issues
2011-05-16 14:11:36 +01:00
Tom Christie
e92002ddde
nested resources now working
2011-05-16 09:14:01 +01:00
Tom Christie
c1b9af8453
Docs on resources
2011-05-13 17:39:52 +01:00
Tom Christie
325e63a3a7
Sorting out resources. Doing some crazy magic automatic url resolving stuff. Yum.
2011-05-13 17:19:12 +01:00
Tom Christie
8f6bcac7f3
cleanup
2011-05-13 09:59:36 +01:00