Commit Graph

18 Commits

Author SHA1 Message Date
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