Commit Graph

22 Commits

Author SHA1 Message Date
Tom Christie
db7d15d5d1 Merge pull request #181 from flashingpumpkin/master
Maintain a reference to the parent/root serializer
2012-08-23 04:15:41 -07:00
Alen Mujezinovic
2f9775c12d Don't ever return the normal serializer again. 2012-08-13 15:58:23 +01:00
Tom Christie
11147ce13e Don't bork if request attribute is not set. 2012-06-28 14:16:30 +02:00
Sean C. Farley
1b49c5e3e5 Pass request to related serializers
Related serializers may need access to the request to properly serialize
a child resource.  For example, reverse() in djangorestframework.reverse
uses request if available to return an absolute URL.  While the parent
resource has access to the request to generate the absolute URL, the
child resource does not.
2012-06-26 19:27:57 -04:00
Max Arnold
b689db17b3 Allow RawQuerySet serialization 2012-05-22 12:39:50 +07:00
Alen Mujezinovic
537fa19bac Whoops. Adding the .parent attribute to the Serializer class broke
getattr(self,'parent',self). This fixes it.
2012-03-01 13:17:29 +00:00
Alen Mujezinovic
0a57cf9876 Added a .parent attribute to the Serializer object for documentation
purposes
2012-03-01 12:51:23 +00:00
Alen Mujezinovic
54a19105f0 Maintain a reference to the parent serializer when descending down into fields 2012-03-01 12:46:38 +00:00
Shawn Lewis
9c92f96ce2 Fix for #178.
Related serializers passed in via include now work as expected.
2012-02-23 16:30:44 -08:00
Tom Christie
5a5f24f263 Gotta love dynamic languages 2012-02-21 13:38:21 +00:00
Tom Christie
dea4a45ec7 pep8/pyflakes cleanup 2012-01-21 18:33:34 +00:00
Sébastien Piquemal
792bc4d608 fixed issue#73 and added a test 2012-01-10 20:38:01 +02:00
Ewoud Kohl van Wijngaarden
0d64b4a704 Make a nested if flat
This is a possible fix for issue #73.  The problem occurs when the first
if-statement is true, but the second is not. This results into the
variable obj not being set. This commit solves it by removing that
branch.
2012-01-09 15:56:41 +01:00
Tom Christie
07349597ab whitespace fixes 2011-12-29 13:31:12 +00:00
Marco Westerhof
2be350293b fix for unhandled _SkipField exception in Serializer.serialize_model 2011-12-13 11:14:23 +01:00
Tom Christie
249eb6f931 Make sure to check for "is not None" so that depth=0 gets assigned properly. Thanks thomasst. 2011-09-29 19:47:20 +02:00
Sébastien Piquemal
11ee385743 fixed a bug in serializers 2011-07-06 14:18:48 +03:00
Sébastien Piquemal
3161475562 debugged serializers 2011-07-04 11:31:46 +03:00
Tom Christie
8d51759dd1 Fix bitbucket issue 39. All further issues should be on github 2011-07-01 12:29:42 +01:00
Tom Christie
82de0cf50a Decimals are a protected_type - let's leave them up to the renderer to deal with 2011-06-21 23:01:41 +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