diff options
| author | Tom Christie | 2014-08-12 14:49:18 +0100 | 
|---|---|---|
| committer | Tom Christie | 2014-08-12 14:49:18 +0100 | 
| commit | 0ed41c60de9d9f5d56c6a172af810e589a646702 (patch) | |
| tree | cf28e072afd8e44608142459b2df6bf0d3e47a25 | |
| parent | 3f6137116f1e712b56d61f11fb06ea9792df193e (diff) | |
| download | django-rest-framework-0ed41c60de9d9f5d56c6a172af810e589a646702.tar.bz2 | |
Latest sponsor updates
| -rw-r--r-- | api-guide/fields.html | 3 | ||||
| -rw-r--r-- | api-guide/serializers.html | 3 | ||||
| -rw-r--r-- | api-guide/throttling.html | 2 | ||||
| -rw-r--r-- | img/sponsors/3-openeye.png | bin | 0 -> 14155 bytes | |||
| -rw-r--r-- | img/sponsors/3-teonite.png | bin | 0 -> 7882 bytes | |||
| -rw-r--r-- | topics/browsable-api.html | 6 | ||||
| -rw-r--r-- | topics/kickstarter-announcement.html | 6 | ||||
| -rw-r--r-- | tutorial/5-relationships-and-hyperlinked-apis.html | 2 | 
8 files changed, 14 insertions, 8 deletions
| diff --git a/api-guide/fields.html b/api-guide/fields.html index fc1e8ac5..ad29a6cb 100644 --- a/api-guide/fields.html +++ b/api-guide/fields.html @@ -212,6 +212,7 @@ a.fusion-poweredby {  <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> +<li><a href="#django-rest-framework-gis">django-rest-framework-gis</a></li>                <div class="promo"> @@ -458,6 +459,8 @@ class ColourField(serializers.WritableField):  <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> +<h2 id="django-rest-framework-gis">django-rest-framework-gis</h2> +<p>The <a href="https://github.com/djangonauts/django-rest-framework-gis">django-rest-framework-gis</a> package provides geographic addons for django rest framework like a  <code>GeometryField</code> field and a GeoJSON serializer.</p>            </div><!--/span-->          </div><!--/row-->        </div><!--/.fluid-container--> diff --git a/api-guide/serializers.html b/api-guide/serializers.html index 08476703..850b6dc5 100644 --- a/api-guide/serializers.html +++ b/api-guide/serializers.html @@ -208,6 +208,7 @@ a.fusion-poweredby {  <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> +<li><a href="#geofeaturemodelserializer">GeoFeatureModelSerializer</a></li>                <div class="promo"> @@ -669,6 +670,8 @@ The <code>ModelSerializer</code> class lets you automatically create a Serialize  <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> +<h2 id="geofeaturemodelserializer">GeoFeatureModelSerializer</h2> +<p>The <a href="https://github.com/djangonauts/django-rest-framework-gis">django-rest-framework-gis</a> package provides a <code>GeoFeatureModelSerializer</code> serializer class that supports GeoJSON both for read and write operations.</p>            </div><!--/span-->          </div><!--/row-->        </div><!--/.fluid-container--> diff --git a/api-guide/throttling.html b/api-guide/throttling.html index 5739aa21..e0bb189c 100644 --- a/api-guide/throttling.html +++ b/api-guide/throttling.html @@ -249,7 +249,7 @@ class ExampleView(APIView):          return Response(content)  </code></pre>  <p>Or, if you're using the <code>@api_view</code> decorator with function based views.</p> -<pre class="prettyprint lang-py"><code>@api_view('GET') +<pre class="prettyprint lang-py"><code>@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.pngBinary files differ new file mode 100644 index 00000000..573140ed --- /dev/null +++ b/img/sponsors/3-openeye.png diff --git a/img/sponsors/3-teonite.png b/img/sponsors/3-teonite.pngBinary files differ new file mode 100644 index 00000000..0c098478 --- /dev/null +++ b/img/sponsors/3-teonite.png diff --git a/topics/browsable-api.html b/topics/browsable-api.html index 3db01407..cadd0bb4 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 %}  </code></pre> -<p>A suitable replacement theme can be generated using Bootstrap's <a href="http://twitter.github.com/bootstrap/customize.html#variables">Customize Tool</a>.  There are also pre-made themes available at <a href="http://bootswatch.com/">Bootswatch</a>.  To use any of the Bootswatch themes, simply download the theme's <code>bootstrap.min.css</code> file, add it to your project, and replace the default one as described above.</p> +<p>A suitable replacement theme can be generated using Bootstrap's <a href="http://getbootstrap.com/2.3.2/customize.html">Customize Tool</a>.  There are also pre-made themes available at <a href="http://bootswatch.com/">Bootswatch</a>.  To use any of the Bootswatch themes, simply download the theme's <code>bootstrap.min.css</code> file, add it to your project, and replace the default one as described above.</p>  <p>You can also change the navbar variant, which by default is <code>navbar-inverse</code>, using the <code>bootstrap_navbar_variant</code> block.  The empty <code>{% block bootstrap_navbar_variant %}{% endblock %}</code> will use the original Bootstrap navbar style.</p>  <p>Full example:</p>  <pre class="prettyprint lang-py"><code>{% extends "rest_framework/base.html" %} @@ -247,7 +247,7 @@ a.fusion-poweredby {  <li><code>bodyclass</code>                  - Class attribute for the <code><body></code> tag, empty by default.</li>  <li><code>bootstrap_theme</code>            - CSS for the Bootstrap theme.</li>  <li><code>bootstrap_navbar_variant</code>   - CSS class for the navbar.</li> -<li><code>branding</code>                   - Branding section of the navbar, see <a href="http://twitter.github.com/bootstrap/components.html#navbar">Bootstrap components</a>.</li> +<li><code>branding</code>                   - Branding section of the navbar, see <a href="http://getbootstrap.com/2.3.2/components.html#navbar">Bootstrap components</a>.</li>  <li><code>breadcrumbs</code>                - 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.</li>  <li><code>footer</code>                     - Any copyright notices or similar footer materials can go here (by default right-aligned).</li>  <li><code>script</code>                     - JavaScript files for the page.</li> @@ -256,7 +256,7 @@ a.fusion-poweredby {  <li><code>userlinks</code>                  - 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 <code>{{ block.super }}</code> to preserve the authentication links.</li>  </ul>  <h4 id="components">Components</h4> -<p>All of the standard <a href="http://twitter.github.com/bootstrap/components.html">Bootstrap components</a> are available.</p> +<p>All of the standard <a href="http://getbootstrap.com/2.3.2/components.html">Bootstrap components</a> are available.</p>  <h4 id="tooltips">Tooltips</h4>  <p>The browsable API makes use of the Bootstrap tooltips component.  Any element with the <code>js-tooltip</code> class and a <code>title</code> attribute has that title content will display a tooltip on hover events.</p>  <h3 id="login-template">Login Template</h3> diff --git a/topics/kickstarter-announcement.html b/topics/kickstarter-announcement.html index 757043f5..547b1d7e 100644 --- a/topics/kickstarter-announcement.html +++ b/topics/kickstarter-announcement.html @@ -298,7 +298,6 @@ a.fusion-poweredby {  <li><a href="http://www.aba-systems.com.au/" rel="nofollow" style="background-image:url(../img/sponsors/3-aba.png);">ABA Systems</a></li>  <li><a href="http://beefarm.ru/" rel="nofollow" style="background-image:url(../img/sponsors/3-beefarm.png);">beefarm.ru</a></li>  <li><a href="http://www.vzzual.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-vzzual.png);">Vzzual.com</a></li> -<!--Vzzual-->  <!--Linovia-->  <li><a href="http://infinite-code.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-infinite_code.png);">Infinite Code</a></li>  <!--Jon--> @@ -307,16 +306,17 @@ a.fusion-poweredby {  <li><a href="http://blimp.io/" rel="nofollow" style="background-image:url(../img/sponsors/3-blimp.png);">Blimp</a></li>  <li><a href="http://pathwright.com" rel="nofollow" style="background-image:url(../img/sponsors/3-pathwright.png);">Pathwright</a></li>  <li><a href="http://fluxility.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-fluxility.png);">Fluxility</a></li> +<li><a href="http://teonite.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-teonite.png);">Teonite</a></li>  <li><a href="http://trackmaven.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-trackmaven.png);">TrackMaven</a></li>  <li><a href="http://www.nephila.co.uk/" rel="nofollow" style="background-image:url(../img/sponsors/3-nephila.png);">Nephila</a></li>  <!--Haris-->  <li><a href="http://www.aditium.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-aditium.png);">Aditium</a></li> -<!--Craig--> +<li><a href="http://www.eyesopen.com/" rel="nofollow" style="background-image:url(../img/sponsors/3-openeye.png);">OpenEye Scientific Software</a></li>  </ul>  <div style="clear: both; padding-bottom: 20px;"></div> -<p><strong>Individual contributions</strong>: Paul Hallet, <a href="http://www.paulwhippconsulting.com/">Paul Whipp</a>, Jannis Leidel, <a href="http://spielmannsolutions.com/">Johannes Spielmann</a>,  <a href="http://chrisheisel.com/">Chris Heisel</a>, Marwan Alsabbagh.</p> +<p><strong>Individual contributions</strong>: Paul Hallet, <a href="http://www.paulwhippconsulting.com/">Paul Whipp</a>, Jannis Leidel, <a href="http://spielmannsolutions.com/">Johannes Spielmann</a>, <a href="http://brooklynhacker.com/">Rob Spectre</a>, <a href="http://chrisheisel.com/">Chris Heisel</a>, Marwan Alsabbagh.</p>            </div><!--/span-->          </div><!--/row-->        </div><!--/.fluid-container--> diff --git a/tutorial/5-relationships-and-hyperlinked-apis.html b/tutorial/5-relationships-and-hyperlinked-apis.html index 72a2319b..ae1f9bd2 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):  <p>The other obvious thing that's still missing from our pastebin API is the code highlighting endpoints.</p>  <p>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.</p>  <p>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.</p> -<p>Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own <code>.get()</code> method.  In your snippets.views add:</p> +<p>Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own <code>.get()</code> method.  In your <code>snippets.views</code> add:</p>  <pre class="prettyprint lang-py"><code>from rest_framework import renderers  from rest_framework.response import Response | 
