Available settings ================== The following settings can be added to a project's Django settings file. .. _settings.API_DEFAULT_AUTHENTICATORS: ``API_DEFAULT_AUTHENTICATORS`` ------------------------------ The authenticator classes to use in all endpoints by default. Defaults to:: ( 'api.authentication.DjangoSessionAuthenticator', ) .. _settings.API_DEFAULT_AUTHORISERS: ``API_DEFAULT_AUTHORISERS`` --------------------------- The authoriser classes to use in all endpoints by default. Defaults to:: ( 'api.authorisation.GuestReadOnlyOrDjangoUserAuthoriser', ) .. _settings.API_DEFAULT_RPP: ``API_DEFAULT_RPP`` ------------------- The default number of items to return in a paginated list (defaults to 10). .. _settings.API_URL_OVERRIDES: ``API_URL_OVERRIDES`` --------------------- A dictionary defining the alternative fields used as identifiers for models. For example, you probably don't want users identified by primary key, so the default override definition looks like this:: { 'auth.user': ('username', lambda o: o.username) } The key is the Django model, specified in `.` format. The value is a tuple containing the name of the field, which is passed to the REST URLconf generator, and a lambda function that obtains the value of that field from a given model instance. .. _settings.API_DEBUG: ``API_DEBUG`` ------------- Defaults to the value of the site's ``DEBUG`` setting. Used to determine whether exception info should be returned via the API endpoint, in the event of an internal server error.