fuel-web/nailgun
Dmitry Sutyagin 03aaca2dee Add limit, offset, order in collection GET
Allow limiting the number of objects returned via GET
by providing "limit"
Example: api/notifications?limit=5

Allow offseting (skipping N first records) via "offset"
Example: api/notifications?offset=100

Allow ordering of objects by providing "order_by"
Example: api/notifications?order_by=-id

Add helper functions/classes to:
- get HTTP parameters (limit, offset, order_by)
- get scoped collection query by applying 4 operations
  filter, order, offset, limit
- set Conent-Range header if scope limits are present

Make default NailgunCollection's GET utilize scoped query
This makes default (parent) GET of child handlers support paging
and ordering (overriden GET methods will not get this functionality
automatically)
NailgunCollection.GET is also an example of how to implement
this new functionality.

Helper functions/classes can be utilized in child handler methods
to implement filters / ordering / paging

Related-Bug: 1657348
Change-Id: I7760465f70b3f69791e7a0c558a26e8ba55c934a
2017-02-14 08:11:23 +00:00
..
examples
nailgun Add limit, offset, order in collection GET 2017-02-14 08:11:23 +00:00
tools Do not remove logs on 'tox -e cleanup' 2016-09-06 13:27:44 +03:00
MANIFEST.in
conftest.py Add option to flush database before/after tests 2014-11-26 11:33:58 +02:00
manage.py Add fuyaql to allow debug expressions on master node 2016-06-22 15:50:45 +03:00
requirements.txt Stick to jsonschema prior 2.6.0 2017-02-07 14:13:55 +00:00
setup.cfg Align nailgun docs building with OS-Infra 2016-04-25 19:33:43 +03:00
setup.py Extract cluster upgrade to a separate repository 2016-07-29 12:44:00 +03:00
test-requirements.txt Align nailgun docs building with OS-Infra 2016-04-25 19:33:43 +03:00
tox.ini Fix hacking 0.10 errors in nailgun 2015-10-08 12:01:55 +02:00