aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/relations.py
AgeCommit message (Collapse)Author
2015-03-06Add support for serializing models with m2m related fieldsMatt d'Entremont
- In both ManyRelatedField, provide an empty return when trying to access a relation field if the instance in question has no PK (so likely hasn't been inserted yet) - Add relevant tests - Without these changes, exceptions would be raised when trying to serialize the uncreated models as it is impossible to query relations without a PK - Add test to ensure RelatedField does not regress as currently supports being serialized with and unsaved model
2015-02-05Fix NamespaceVersioning with hyperlinked serializer fieldsTom Christie
2015-02-02Provide rest_framework.resolve. Fixes #2489Brandon Cazander
2015-01-30Merge masterTom Christie
2015-01-27:bug: ManyRelatedField get_value clearing field on partial updateSusan Dreher
A PATCH to a serializer's non-related CharField was clearing an ancillary StringRelatedField(many=True) field. The issue appears to be in the ManyRelatedField's get_value method, which was returning a [] instead of empty when the request data was a MultiDict. This fix mirrors code in fields.py, class Field, get_value, Ln. 272, which explicitly returns empty on a partial update. Tests added to demonstrate the issue.
2015-01-19Merge masterTom Christie
2015-01-14Preserve ordering on relationship drop-down choices. Closes #2408.Tom Christie
2015-01-07prefer single quotes in source and double quotes in user visible strings; ↵Craig Blaszczyk
add some missing full stops to user visible strings
2015-01-07use double quotes in user messagesCraig Blaszczyk
2015-01-07use double quotes for user visible strings; end user visible strings in full ↵Craig Blaszczyk
stops; add some missing translation tags
2014-12-17str() -> six.text_type(). Closes #2290.Tom Christie
2014-12-10Move commentTom Christie
2014-12-10Drop get_iterable()Tom Christie
2014-12-10Optimizations play nicely with select_related, prefetch_relatedTom Christie
2014-12-09Hyperlinked PK optimization. Closes #1872.Tom Christie
2014-12-08Added missing translation markers in realtions.py. Closes #2231.Tom Christie
2014-12-05Removed unused imports, pep8 fixes, typo fixesTymur Maryokhin
2014-12-04Removed custom urlparse compatTymur Maryokhin
2014-12-04Removed custom StringIO, force_text, smart_text compatTymur Maryokhin
2014-11-26Tweak to 3.0 relationship docsTom Christie
2014-11-26Docstring for 'many_init'Tom Christie
2014-11-13Refactor manyTom Christie
2014-11-13Use select inputs for relationships. Closes #2058.Tom Christie
2014-11-07Support dotted source on relational fieldsTom Christie
2014-11-05Pass through kwargs to both Serializer and ListSerializerTom Christie
2014-10-16Performance for PK fieldsTom Christie
2014-10-09First pass on nested serializers in HTMLTom Christie
2014-10-08Limit blank string -> None to just be on relational fieldsTom Christie
2014-10-08TweaksTom Christie
2014-10-08Tests for generic relationshipsTom Christie
2014-10-03Merge branch 'version-3.0' of ↵Tom Christie
https://github.com/tomchristie/django-rest-framework into version-3.0
2014-10-03Revert accidental stupidityTom Christie
2014-10-03Merge pull request #1921 from koordinates/fix-typosTom Christie
Minor: fix spelling and grammar, mostly in 3.0 announcement
2014-10-03More spelling tweaksCraig de Stigter
2014-10-03Minor: fix spelling and grammar, mostly in 3.0 announcementCraig de Stigter
2014-10-02Browsable API tweaksTom Christie
2014-10-02First pass on incorperating the form rendering into the browsable APITom Christie
2014-10-01More forms supportTom Christie
2014-10-01Use six.text_type instead of str everywhereTom Christie
2014-09-25Clean up bind - no longer needs to be called multiple times in nested fieldsTom Christie
2014-09-18ModelSerializer.create() to handle many to many by defaultTom Christie
2014-09-18First pass on ManyRelationTom Christie
2014-09-18get_base_field() refactorTom Christie
2014-09-12Use Resolver404 instead of base ExceptionTom Christie
2014-09-12Tests for relational fields (not including many=True)Tom Christie
2014-09-12Clean up relational fields queryset usageTom Christie
2014-09-12to_internal_value() and to_representation()Tom Christie
2014-09-03More test passingTom Christie
2014-09-02Getting tests passingTom Christie
2014-09-02Add relations and get tests runningTom Christie