diff --git a/api-guide/fields.html b/api-guide/fields.html index fc1e8ac5c..ad29a6cb7 100644 --- a/api-guide/fields.html +++ b/api-guide/fields.html @@ -212,6 +212,7 @@ a.fusion-poweredby {
  • Third party packages
  • DRF Compound Fields
  • DRF Extra Fields
  • +
  • django-rest-framework-gis
  • @@ -458,6 +459,8 @@ class ColourField(serializers.WritableField):

    The drf-compound-fields package provides "compound" serializer fields, such as lists of simple values, which can be described by other fields rather than serializers with the many=True 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.

    DRF Extra Fields

    The drf-extra-fields package provides extra serializer fields for REST framework, including Base64ImageField and PointField classes.

    +

    django-rest-framework-gis

    +

    The django-rest-framework-gis package provides geographic addons for django rest framework like a GeometryField field and a GeoJSON serializer.

    diff --git a/api-guide/serializers.html b/api-guide/serializers.html index 084767038..850b6dc59 100644 --- a/api-guide/serializers.html +++ b/api-guide/serializers.html @@ -208,6 +208,7 @@ a.fusion-poweredby {
  • Customising the default fields
  • Third party packages
  • MongoengineModelSerializer
  • +
  • GeoFeatureModelSerializer
  • @@ -669,6 +670,8 @@ The ModelSerializer class lets you automatically create a Serialize

    The following third party packages are also available.

    MongoengineModelSerializer

    The django-rest-framework-mongoengine package provides a MongoEngineModelSerializer serializer class that supports using MongoDB as the storage layer for Django REST framework.

    +

    GeoFeatureModelSerializer

    +

    The django-rest-framework-gis package provides a GeoFeatureModelSerializer serializer class that supports GeoJSON both for read and write operations.

    diff --git a/api-guide/throttling.html b/api-guide/throttling.html index 5739aa217..e0bb189c3 100644 --- a/api-guide/throttling.html +++ b/api-guide/throttling.html @@ -249,7 +249,7 @@ class ExampleView(APIView): return Response(content)

    Or, if you're using the @api_view decorator with function based views.

    -
    @api_view('GET')
    +
    @api_view(['GET'])
     @throttle_classes([UserRateThrottle])
     def example_view(request, format=None):
         content = {
    diff --git a/img/sponsors/3-openeye.png b/img/sponsors/3-openeye.png
    new file mode 100644
    index 000000000..573140ed6
    Binary files /dev/null and b/img/sponsors/3-openeye.png differ
    diff --git a/img/sponsors/3-teonite.png b/img/sponsors/3-teonite.png
    new file mode 100644
    index 000000000..0c0984783
    Binary files /dev/null and b/img/sponsors/3-teonite.png differ
    diff --git a/topics/browsable-api.html b/topics/browsable-api.html
    index 3db01407b..cadd0bb43 100644
    --- a/topics/browsable-api.html
    +++ b/topics/browsable-api.html
    @@ -222,7 +222,7 @@ a.fusion-poweredby {
         <link rel="stylesheet" href="/path/to/my/bootstrap.css" type="text/css">
     {% endblock %}
     
    -

    A suitable replacement theme can be generated using Bootstrap's Customize Tool. There are also pre-made themes available at Bootswatch. To use any of the Bootswatch themes, simply download the theme's bootstrap.min.css file, add it to your project, and replace the default one as described above.

    +

    A suitable replacement theme can be generated using Bootstrap's Customize Tool. There are also pre-made themes available at Bootswatch. To use any of the Bootswatch themes, simply download the theme's bootstrap.min.css file, add it to your project, and replace the default one as described above.

    You can also change the navbar variant, which by default is navbar-inverse, using the bootstrap_navbar_variant block. The empty {% block bootstrap_navbar_variant %}{% endblock %} will use the original Bootstrap navbar style.

    Full example:

    {% extends "rest_framework/base.html" %}
    @@ -247,7 +247,7 @@ a.fusion-poweredby {
     
  • bodyclass - Class attribute for the <body> tag, empty by default.
  • bootstrap_theme - CSS for the Bootstrap theme.
  • bootstrap_navbar_variant - CSS class for the navbar.
  • -
  • branding - Branding section of the navbar, see Bootstrap components.
  • +
  • branding - Branding section of the navbar, see Bootstrap components.
  • breadcrumbs - Links showing resource nesting, allowing the user to go back up the resources. It's recommended to preserve these, but they can be overridden using the breadcrumbs block.
  • footer - Any copyright notices or similar footer materials can go here (by default right-aligned).
  • script - JavaScript files for the page.
  • @@ -256,7 +256,7 @@ a.fusion-poweredby {
  • userlinks - This is a list of links on the right of the header, by default containing login/logout links. To add links instead of replace, use {{ block.super }} to preserve the authentication links.
  • Components

    -

    All of the standard Bootstrap components are available.

    +

    All of the standard Bootstrap components are available.

    Tooltips

    The browsable API makes use of the Bootstrap tooltips component. Any element with the js-tooltip class and a title attribute has that title content will display a tooltip on hover events.

    Login Template

    diff --git a/topics/kickstarter-announcement.html b/topics/kickstarter-announcement.html index 757043f5c..547b1d7ed 100644 --- a/topics/kickstarter-announcement.html +++ b/topics/kickstarter-announcement.html @@ -298,7 +298,6 @@ a.fusion-poweredby {
  • ABA Systems
  • beefarm.ru
  • Vzzual.com
  • -
  • Infinite Code
  • @@ -307,16 +306,17 @@ a.fusion-poweredby {
  • Blimp
  • Pathwright
  • Fluxility
  • +
  • Teonite
  • TrackMaven
  • Nephila
  • Aditium
  • - +
  • OpenEye Scientific Software
  • -

    Individual contributions: Paul Hallet, Paul Whipp, Jannis Leidel, Johannes Spielmann, Chris Heisel, Marwan Alsabbagh.

    +

    Individual contributions: Paul Hallet, Paul Whipp, Jannis Leidel, Johannes Spielmann, Rob Spectre, Chris Heisel, Marwan Alsabbagh.

    diff --git a/tutorial/5-relationships-and-hyperlinked-apis.html b/tutorial/5-relationships-and-hyperlinked-apis.html index 72a2319b3..ae1f9bd28 100644 --- a/tutorial/5-relationships-and-hyperlinked-apis.html +++ b/tutorial/5-relationships-and-hyperlinked-apis.html @@ -223,7 +223,7 @@ def api_root(request, format=None):

    The other obvious thing that's still missing from our pastebin API is the code highlighting endpoints.

    Unlike all our other API endpoints, we don't want to use JSON, but instead just present an HTML representation. There are two styles of HTML renderer provided by REST framework, one for dealing with HTML rendered using templates, the other for dealing with pre-rendered HTML. The second renderer is the one we'd like to use for this endpoint.

    The other thing we need to consider when creating the code highlight view is that there's no existing concrete generic view that we can use. We're not returning an object instance, but instead a property of an object instance.

    -

    Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own .get() method. In your snippets.views add:

    +

    Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own .get() method. In your snippets.views add:

    from rest_framework import renderers
     from rest_framework.response import Response