Commit Graph

58 Commits

Author SHA1 Message Date
Tom Christie
c71b6fb090 Replace 'x.has_key(y)' with 'y in x' 2012-01-11 16:43:04 +00:00
Tom Christie
0cfe2acdef Minor cleanup on ModelMixin 2012-01-11 14:07:33 +00:00
Tom Christie
dacc9c0ff7 Merge https://github.com/sebzur/django-rest-framework 2012-01-11 13:54:44 +00:00
Sebastian Żurek
86b1495cad QueryMixin to ModelMixin rename. 2012-01-10 21:42:50 +01:00
Sebastian Żurek
10adf4c31a QueryMixin class updates (comments + docs and the definition of get_instance_data method) 2012-01-08 23:10:21 +01:00
Jamie Matthews
18535c7a38 Preserve existing query params in PaginatorMixin
Previously, generation of next/previous links would discard any existing
query parameters. This commit introduces a dependency on URLObject, which
is used to intelligently parse and modify URLs to ensure existing params
are preserved.

Addresses issues #107
2012-01-05 14:07:31 +00:00
Sebastian Żurek
abc7439f8d QueryMixin created + related mixins updates 2012-01-03 09:55:12 +01:00
Tom Christie
5db422c9d3 Add pagination. Thanks @devioustree! 2011-12-09 13:37:53 +00:00
Tom Christie
325ee1e3a4 Merge pull request #62 from txels/master
HTTP OPTIONS support
2011-12-09 04:40:14 -08:00
Andrew McCloud
968c5e43f3 Removed rogue import for LimitBytes to fix issue #63 2011-07-31 13:21:06 -07:00
Carles Barrobés
3b413dbb40 Added support for OPTIONS method, including a few unit tests 2011-07-30 22:23:53 +02:00
Tom Christie
e956d5177e Revert "Added pagination mixin. Need to write tests"
This reverts commit 1eb2dfcc3a.
2011-07-19 20:39:20 +01:00
Tom Christie
20a95db60a Revert "Now throws a 404 if page isn't an int"
This reverts commit ae059c78da.
2011-07-19 20:39:15 +01:00
Tom Drummond
ae059c78da Now throws a 404 if page isn't an int 2011-07-19 17:54:37 +01:00
Tom Drummond
1eb2dfcc3a Added pagination mixin. Need to write tests 2011-07-19 17:06:56 +01:00
Tom Christie
d1ed9884d8 Merge pull request #46 from jakul/m2m_create_through
Update to existing pull request "Support for creating objects with m2m relationsM2m"
2011-07-11 12:33:52 -07:00
Tom Christie
5433cb3e27 Merge pull request #44 from fzunino/m2m_create
Support for creating objects with m2m relations
2011-07-11 12:33:40 -07:00
Craig Blaszczyk
91b9d0b2a3 remove hardcoded model._meta.many_to_many[0]; update mixin tests to test with 0, 1, or multiple groups 2011-07-08 18:14:52 +01:00
Craig Blaszczyk
344db0d733 update mixin to work with m2m data using a through field, by storing the name of the field and manually creating an object in the related table 2011-07-08 18:04:22 +01:00
Sébastien Piquemal
e53c3cd417 now cleans data from parameters used for overloads 2011-07-06 14:05:57 +03:00
Fernando Zunino
a634d10cbf Support for creating objects with m2m relations 2011-07-05 02:25:39 -03:00
Tom Christie
ca4b7560cb merge 2011-07-01 11:31:04 +01:00
Tom Christie
16d8c3255d Fix #36 2011-07-01 03:30:28 -07: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
Michael Fötsch
d8bec115ad Allow .json .html .xml style urls and also allow these formats to be specified in a "?format=..." query string. 2011-06-26 16:03:36 +02: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
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
9e9ae60949 forms/models can be set on the view as well as the resource 2011-05-27 10:35:43 +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
Tom Christie
894bf34451 tidy up last bits of renderer media type handling 2011-05-24 16:31:17 +01:00
Tom Christie
ce6e5fdc01 Renderers can now cope with parameterised args. ResponseMixin gets cleaned up & added Renderer.can_handle_response(), mirroring Parsers.can_handle_request() 2011-05-24 13:29:30 +01:00
Tom Christie
370274f564 Allow views to return HttpResponses. Add initial() hook method 2011-05-24 10:27:24 +01:00
Tom Christie
c531759147 name and description 2011-05-23 17:07:31 +01:00
Tom Christie
e7f8c06dbb Merge in marko's doc markup 2011-05-19 08:49:57 +01:00
Tom Christie
8c3280f9c0 data flattening needs to go into resource 2011-05-19 08:36:55 +01:00
markotibold
92c015e049 Most of the actual work so far has been markup really. 2011-05-18 22:13:48 +02:00
Tom Christie
bfbb8ceccf Merge Marko's doc improvements. 2011-05-17 09:15:35 +01:00
Tom Christie
1e04790d50 Fixing some of the last blocking issues 2011-05-16 14:11:36 +01:00
Tom Christie
47645319c9 Ensure there is always a resource attribute set 2011-05-13 17:46:31 +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
Tom Christie
44c8b89c60 _perform_form_overloading becomes transparent 2011-05-12 16:03:14 +01:00
Tom Christie
a31a68d6cb yet more API cleanup 2011-05-12 15:14:22 +01:00
Tom Christie
b5b231a874 yet more API cleanup 2011-05-12 15:11:14 +01:00
Tom Christie
15f9e7c566 refactoring resource specfic stuff into ResourceMixin - validators now defunct 2011-05-12 12:55:13 +01:00
Tom Christie
4d12679675 More tests, getting new serialization into resource 2011-05-10 16:01:58 +01:00
Tom Christie
a2575c1191 Bits of cleanup 2011-05-10 12:59:13 +01:00
Tom Christie
cc4c9a9518 Bits of cleanup 2011-05-10 12:51:49 +01:00
Tom Christie
144d52c7b3 Rename resource to view in few remaining places in renderers (because that's what it now is) 2011-05-10 12:28:11 +01:00