SERRANO_AUTH_REQUIRED

Boolean denoting whether authentication is required to access the API. Default False

SERRANO_CORS_ENABLED

Boolean denoting whether Cross-Origin Resource Sharing is enabled. Default False

SERRANO_CORS_ORIGINS

Introduced in 2.1.2

List/tuple of hosts for the Access-Control-Allow-Origin response header. If cross-origin request is received from an origin not in this list, the headers that succeeds the pre-flight request will be not be set. If the list is empty, all origins are assumed to be allowed. Default ().

SERRANO_CORS_ORIGIN

Deprecated in 2.1.2, see `SERRANOCORS_ORIGINS`_

String of comma-separated hosts for Access-Control-Allow-Origin response header. This restricts access to which clients can access this resource. Default * (all hosts)

SERRANO_TOKEN_TIMEOUT

Read more about API Tokens.

SERRANO_RATE_LIMIT_COUNT

Integer defining the number of requests that are allowed in any given time window defined by SERRANO_RATE_LIMIT_SECONDS. If SERRANO_AUTH_RATE_LIMIT_COUNT is set, then this limit only applies to unauthenticated requests. If this number of requests is exceeded within the time interval, the response will be 429 Too Many Requests. If this setting is not explicity set, it will default to the rate_limit_count value from restlib2.

SERRANO_RATE_LIMIT_SECONDS

Integer defining the length of the request rate limiting time interval(in seconds). If SERRANO_AUTH_RATE_LIMIT_SECONDS is set, then this interval duration only applies to unauthenticated requests. If more than SERRANO_RATE_LIMIT_COUNT requests are received within this time interval, the response will be 429 Too Many Requests. If this setting is not explicity set, it will default to the rate_limit_seconds value from restlib2.

SERRANO_AUTH_RATE_LIMIT_COUNT

Integer defining the number of authenticated requests that are allowed in any given time window defined by SERRANO_AUTH_RATE_LIMIT_SECONDS. If this number of authenticated requests is exceeded within the time interval, the response will be 429 Too Many Requests. If this setting is not explicity set, it will default to SERRANO_RATE_LIMIT_COUNT.

SERRANO_AUTH_RATE_LIMIT_SECONDS

Integer defining the length of the authenticated request rate limiting time interval(in seconds). If more than SERRANO_AUTH_RATE_LIMIT_COUNT authenticated requests are received within this time interval, the response will be 429 Too Many Requests. If this setting is not explicity set, it will default to SERRANO_RATE_LIMIT_SECONDS.

SERRANO_QUERY_REVERSE_NAME

Name of the reverseable url to use when constructing query urls in emails notifying people that a query has been shared with them. The instructions below explain how to use this setting within a fictional app named example which defines the following setting ROOT_URLCONF = example.conf.urls in example/conf/global_settings.py. Also, since Cilantro has a predefined route for /results/<query_pk>/, we will use that path when constructing the url in the example below. You are free to use a different path in the Url you construct below but you will need to setup and implement your own route for handling it as Cilantro only has builtin support for opening queries at /results/<query_pk>/.

Add a new url to handle the query url links. To do this, open example/conf/urls.py and add the following to theurlpatterns:

      url(r'^results/(?P<pk>\d+)/$', 'django.views.static.serve',
          {'document_root': '/results'}, name='query_results'),

Add the SERRANO_QUERY_REVERSE_NAME setting to example/conf/global_settings.py as shown below. Note that if you gave the url a name other than query_result, you will need to use that name as the value for SERRANO_QUERY_REVERSE_NAME below.

SERRANO_QUERY_REVERSE_NAME = 'query_results'