geonode.api.paginator

Classes

CrossSiteXHRPaginator

Module Contents

class geonode.api.paginator.CrossSiteXHRPaginator[source]

Bases: tastypie.paginator.Paginator

get_limit()[source]

Determines the proper maximum number of results to return.

In order of importance, it will use:

  • The user-requested limit from the GET parameters, if specified.

  • The object-level limit if specified.

  • settings.API_LIMIT_PER_PAGE if specified.

Default is 20 per page.

get_offset()[source]

Determines the proper starting offset of results to return.

It attempts to use the user-provided offset from the GET parameters, if specified. Otherwise, it falls back to the object-level offset.

Default is 0.