aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api-guide/fields.html5
-rw-r--r--api-guide/serializers.html9
2 files changed, 12 insertions, 2 deletions
diff --git a/api-guide/fields.html b/api-guide/fields.html
index a7938201..fc1e8ac5 100644
--- a/api-guide/fields.html
+++ b/api-guide/fields.html
@@ -211,6 +211,7 @@ a.fusion-poweredby {
<li><a href="#examples">Examples</a></li>
<li class="main"><a href="#third-party-packages">Third party packages</a></li>
<li><a href="#drf-compound-fields">DRF Compound Fields</a></li>
+<li><a href="#drf-extra-fields">DRF Extra Fields</a></li>
<div class="promo">
@@ -449,12 +450,14 @@ class ColourField(serializers.WritableField):
"""
Serialize the object's class name.
"""
- return obj.__class__
+ return obj.__class__.__name__
</code></pre>
<h1 id="third-party-packages">Third party packages</h1>
<p>The following third party packages are also available.</p>
<h2 id="drf-compound-fields">DRF Compound Fields</h2>
<p>The <a href="http://drf-compound-fields.readthedocs.org">drf-compound-fields</a> package provides "compound" serializer fields, such as lists of simple values, which can be described by other fields rather than serializers with the <code>many=True</code> option. Also provided are fields for typed dictionaries and values that can be either a specific type or a list of items of that type.</p>
+<h2 id="drf-extra-fields">DRF Extra Fields</h2>
+<p>The <a href="https://github.com/Hipo/drf-extra-fields">drf-extra-fields</a> package provides extra serializer fields for REST framework, including <code>Base64ImageField</code> and <code>PointField</code> classes.</p>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->
diff --git a/api-guide/serializers.html b/api-guide/serializers.html
index cbfc334e..08476703 100644
--- a/api-guide/serializers.html
+++ b/api-guide/serializers.html
@@ -6,7 +6,7 @@
<link href="http://www.django-rest-framework.org/img/favicon.ico" rel="icon" type="image/x-icon">
<link rel="canonical" href="http://www.django-rest-framework.org/api-guide/serializers"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="Django, API, REST, Serializers, ModelSerializer, HyperlinkedModelSerializer, Advanced serializer usage">
+ <meta name="description" content="Django, API, REST, Serializers, ModelSerializer, HyperlinkedModelSerializer, Advanced serializer usage, Third party packages">
<meta name="author" content="Tom Christie">
<!-- Le styles -->
@@ -206,6 +206,8 @@ a.fusion-poweredby {
<li class="main"><a href="#advanced-serializer-usage">Advanced serializer usage</a></li>
<li><a href="#dynamically-modifying-fields">Dynamically modifying fields</a></li>
<li><a href="#customising-the-default-fields">Customising the default fields</a></li>
+<li class="main"><a href="#third-party-packages">Third party packages</a></li>
+<li><a href="#mongoenginemodelserializer">MongoengineModelSerializer</a></li>
<div class="promo">
@@ -662,6 +664,11 @@ The <code>ModelSerializer</code> class lets you automatically create a Serialize
def get_pk_field(self, model_field):
return None
</code></pre>
+<hr />
+<h1 id="third-party-packages">Third party packages</h1>
+<p>The following third party packages are also available.</p>
+<h2 id="mongoenginemodelserializer">MongoengineModelSerializer</h2>
+<p>The <a href="https://github.com/umutbozkurt/django-rest-framework-mongoengine">django-rest-framework-mongoengine</a> package provides a <code>MongoEngineModelSerializer</code> serializer class that supports using MongoDB as the storage layer for Django REST framework.</p>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->