aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/serializers.md
diff options
context:
space:
mode:
authorTom Christie2012-10-02 19:54:24 +0100
committerTom Christie2012-10-02 19:54:24 +0100
commite1518de68fa9ad4b2628894abf17924e386ccbda (patch)
treeb1d190f6bd08ce087cf0a2d3e8cd681b5e7e7d04 /docs/api-guide/serializers.md
parent31b06f1721f98730556dc56927b985e4032788c3 (diff)
parentd1b99f350aded62fe480f7dc4749cd63d52715d2 (diff)
downloaddjango-rest-framework-e1518de68fa9ad4b2628894abf17924e386ccbda.tar.bz2
Merge branch 'restframework2' of https://github.com/tomchristie/django-rest-framework into restframework2
Diffstat (limited to 'docs/api-guide/serializers.md')
-rw-r--r--docs/api-guide/serializers.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md
index 38a1e560..4ddc6e0a 100644
--- a/docs/api-guide/serializers.md
+++ b/docs/api-guide/serializers.md
@@ -230,6 +230,9 @@ The `nested` option may also be set by passing it to the `serialize()` method.
class Meta:
model = Account
+ def get_pk_field(self, model_field):
+ return Field(readonly=True)
+
def get_nested_field(self, model_field):
return ModelSerializer()