From e6fd79fd88067d830886f9c463d5b9e5c13d7ce3 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 21 Dec 2013 17:18:57 +0000 Subject: [PATCH] Latest docs build --- api-guide/parsers.html | 3 +++ api-guide/renderers.html | 3 +++ topics/contributing.html | 2 +- tutorial/1-serialization.html | 6 ++++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/api-guide/parsers.html b/api-guide/parsers.html index f651d7cdd..73e3539c9 100644 --- a/api-guide/parsers.html +++ b/api-guide/parsers.html @@ -182,6 +182,7 @@
  • Example
  • Third party packages
  • MessagePack
  • +
  • CamelCase JSON

  • @@ -338,6 +339,8 @@ def parse(self, stream, media_type=None, parser_context=None):

    The following third party packages are also available.

    MessagePack

    MessagePack is a fast, efficient binary serialization format. Juan Riaza maintains the djangorestframework-msgpack package which provides MessagePack renderer and parser support for REST framework.

    +

    CamelCase JSON

    +

    djangorestframework-camel-case provides camel case JSON renderers and parsers for REST framework. This allows serializers to use Python-style underscored field names, but be exposed in the API as Javascript-style camel case field names. It is maintained by Vitaly Babiy.

    diff --git a/api-guide/renderers.html b/api-guide/renderers.html index b1140b881..c68fe2171 100644 --- a/api-guide/renderers.html +++ b/api-guide/renderers.html @@ -195,6 +195,7 @@
  • MessagePack
  • CSV
  • UltraJSON
  • +
  • CamelCase JSON

  • @@ -508,6 +509,8 @@ In this case you can underspecify the media types it should respond to, by using

    Comma-separated values are a plain-text tabular data format, that can be easily imported into spreadsheet applications. Mjumbe Poe maintains the djangorestframework-csv package which provides CSV renderer support for REST framework.

    UltraJSON

    UltraJSON is an optimized C JSON encoder which can give significantly faster JSON rendering. Jacob Haslehurst maintains the drf-ujson-renderer package which implements JSON rendering using the UJSON package.

    +

    CamelCase JSON

    +

    djangorestframework-camel-case provides camel case JSON renderers and parsers for REST framework. This allows serializers to use Python-style underscored field names, but be exposed in the API as Javascript-style camel case field names. It is maintained by Vitaly Babiy.

    diff --git a/topics/contributing.html b/topics/contributing.html index adec4f96c..986ff9244 100644 --- a/topics/contributing.html +++ b/topics/contributing.html @@ -223,7 +223,7 @@

    There are many ways you can contribute to Django REST framework. We'd like it to be a community-led project, so please get involved and help shape the future of the project.

    Community

    The most important thing you can do to help push the REST framework project forward is to be actively involved wherever possible. Code contributions are often overvalued as being the primary way to get involved in a project, we don't believe that needs to be the case.

    -

    If you use REST framework, we'd love you to be vocal about your experiences with it - you might consider writing a blog post about using REST framework, or publishing a tutorial about building a project with a particularJjavascript framework. Experiences from beginners can be particularly helpful because you'll be in the best position to assess which bits of REST framework are more difficult to understand and work with.

    +

    If you use REST framework, we'd love you to be vocal about your experiences with it - you might consider writing a blog post about using REST framework, or publishing a tutorial about building a project with a particular Javascript framework. Experiences from beginners can be particularly helpful because you'll be in the best position to assess which bits of REST framework are more difficult to understand and work with.

    Other really great ways you can help move the community forward include helping answer questions on the discussion group, or setting up an email alert on StackOverflow so that you get notified of any new questions with the django-rest-framework tag.

    When answering questions make sure to help future contributors find their way around by hyperlinking wherever possible to related threads and tickets, and include backlinks from those items if relevant.

    Code of conduct

    diff --git a/tutorial/1-serialization.html b/tutorial/1-serialization.html index 999239029..c75116d3f 100644 --- a/tutorial/1-serialization.html +++ b/tutorial/1-serialization.html @@ -363,9 +363,11 @@ content # '{"pk": 2, "title": "", "code": "print \\"hello, world\\"\\n", "linenos": false, "language": "python", "style": "friendly"}'

    Deserialization is similar. First we parse a stream into Python native datatypes...

    -
    import StringIO
    +
    # This import will use either `StringIO.StringIO` or `io.BytesIO`
    +# as appropriate, depending on if we're running Python 2 or Python 3.
    +from rest_framework.compat import BytesIO
     
    -stream = StringIO.StringIO(content)
    +stream = BytesIO(content)
     data = JSONParser().parse(stream)
     

    ...then we restore those native datatypes into to a fully populated object instance.