From 987880e13138a93d9cc0e44b7ed30297909f7b03 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Tue, 27 Jan 2015 23:15:26 +0100 Subject: Update documentation --- api-guide/authentication/index.html | 2 +- api-guide/fields/index.html | 31 ++++++++++++++++++++++++++++--- api-guide/filtering/index.html | 6 +++--- api-guide/routers/index.html | 6 +++--- api-guide/viewsets/index.html | 2 +- 5 files changed, 36 insertions(+), 11 deletions(-) (limited to 'api-guide') diff --git a/api-guide/authentication/index.html b/api-guide/authentication/index.html index ac8f4629..7a523c63 100644 --- a/api-guide/authentication/index.html +++ b/api-guide/authentication/index.html @@ -648,7 +648,7 @@ python manage.py createsuperuser
  • request.auth will be None.
  • Unauthenticated responses that are denied permission will result in an HTTP 403 Forbidden response.

    -

    If you're using an AJAX style API with SessionAuthentication, you'll need to make sure you include a valid CSRF token for any "unsafe" HTTP method calls, such as PUT, PATCH, POST or DELETE requests. See the Django CSRF documentation for more details.

    +

    If you're using an AJAX style API with SessionAuthentication, you'll need to make sure you include a valid CSRF token for any "unsafe" HTTP method calls, such as PUT, PATCH, POST or DELETE requests. See the Django CSRF documentation for more details.

    OAuthAuthentication

    This authentication uses OAuth 1.0a authentication scheme. OAuth 1.0a provides signature validation which provides a reasonable level of security over plain non-HTTPS connections. However, it may also be considered more complicated than OAuth2, as it requires clients to sign their requests.

    This authentication class depends on the optional django-oauth-plus and oauth2 packages. In order to make it work you must install these packages and add oauth_provider to your INSTALLED_APPS:

    diff --git a/api-guide/fields/index.html b/api-guide/fields/index.html index 9cac530a..83affe26 100644 --- a/api-guide/fields/index.html +++ b/api-guide/fields/index.html @@ -405,6 +405,10 @@ URLField +
  • + UUIDField +
  • + @@ -493,6 +497,10 @@ ListField +
  • + DictField +
  • + @@ -674,6 +682,10 @@ color_channel = serializers.ChoiceField(

    A RegexField that validates the input against a URL matching pattern. Expects fully qualified URLs of the form http://<host>/<path>.

    Corresponds to django.db.models.fields.URLField. Uses Django's django.core.validators.URLValidator for validation.

    Signature: URLField(max_length=200, min_length=None, allow_blank=False)

    +

    UUIDField

    +

    A field that ensures the input is a valid UUID string. The to_internal_value method will return a uuid.UUID instance. On output the field will return a string in the canonical hyphenated format, for example:

    +
    "de305d54-75b4-431b-adb2-eb6b9e546013"
    +

    Numeric fields

    IntegerField

    @@ -767,7 +779,7 @@ color_channel = serializers.ChoiceField(

    Both the allow_blank and allow_null are valid options on ChoiceField, although it is highly recommended that you only use one and not both. allow_blank should be preferred for textual choices, and allow_null should be preferred for numeric or other non-textual choices.

    MultipleChoiceField

    -

    A field that can accept a set of zero, one or many values, chosen from a limited set of choices. Takes a single mandatory argument. to_internal_representation returns a set containing the selected values.

    +

    A field that can accept a set of zero, one or many values, chosen from a limited set of choices. Takes a single mandatory argument. to_internal_value returns a set containing the selected values.

    Signature: MultipleChoiceField(choices)