Commit Graph

74 Commits

Author SHA1 Message Date
Adam Ness
73be041c47 Patch to enable Accept headers in Internet Explorer when an Ajax Library on the client (i.e. jQuery) is sending an XMLHttpRequest 2012-07-02 20:39:56 -07:00
Tom Christie
e15494a172 Remove InstanceMixin auto-url magicks. 2012-02-23 09:21:01 +00:00
Tom Christie
9fb7793861 Fix for URLObject 2.0.0 2012-02-20 20:07:14 +00:00
Sean C. Farley
0954765e91 Chase changes to URLObject's API in v2.0.0
URLObject v2.0.0 removed parse() from its API.
2012-02-20 12:56:27 -05:00
Alen Mujezinovic
add5f32e8a Merge remote branch 'tomchristie/master' 2012-02-09 11:13:42 +00:00
Jamie Matthews
76a7d35813 Ensure duplicate "page" parameters are not created
Previously, URLObject.add_query_param was used to generate
next/previous page links in PaginatorMixin. This resulted
in (for example) page 2's "next" link having the params:

   ?page=2&page=3

Instead, URLObject.set_query_param should be used to replace
the current value of the "page" parameter.
2012-02-07 11:08:55 +00:00
Camille Harang
da8187d2c2 * -> ** 2012-02-01 23:56:54 +01:00
Tom Christie
894f632598 Remove use of Q objects. 2012-02-01 20:48:32 +00:00
Tom Christie
c0674e36d4 Drop implicit 'pk' on last arg in urlconf. (Too magical). 2012-01-28 19:06:40 +00:00
Alen Mujezinovic
dd680d7a0a Added get_renderers method to ResponseMixin 2012-01-27 12:56:05 +00:00
Tom Christie
d1ce9d3914 More consistent comment style. 2012-01-21 18:36:25 +00:00
Tom Christie
dea4a45ec7 pep8/pyflakes cleanup 2012-01-21 18:33:34 +00:00
Tom Christie
a851294d05 get_ordering/get_queryset refactoring 2012-01-21 18:24:10 +00:00
Mjumbe Wawatu Poe
417eacb2ed Add a get_object method to the ModelMixin, and tests 2012-01-20 13:05:44 -05:00
Chris Pickett
338e77837c Added get_queryset method to ListModelMixin.
This can be easily re-implemented in a view, to allow the user to take
such things as request.user into account when creating the queryset.
2012-01-19 12:56:09 -05:00
Ben Timby
0a5ca000ed Docstring/whitespace fixes. 2012-01-18 22:59:30 -05:00
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