From 906fc41262b1840abdb4ee7999f8e485c1fc5483 Mon Sep 17 00:00:00 2001 From: simkimsia Date: Mon, 26 Nov 2018 10:26:18 +0800 Subject: [PATCH] Make explicit how to sort in descending order in README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 2f90cccf..a672af80 100644 --- a/README.md +++ b/README.md @@ -537,6 +537,16 @@ You can use the `sort[]` feature to order your response by one or more fields. D ... ``` +For descending order, simply add a `-` sign. To sort by name in descending order for example + +``` +--> + GET /users/?sort[]=-name +<-- + 200 OK + ... +``` + ## Directory panel We love the DRF browsable API, but wish that it included a directory that would let you see your entire list of endpoints at a glance from any page.