Skip to content

Add new callable predicate setting REQUEST_FILTER to allow custom filtering #212

@kmierzeje

Description

@kmierzeje

Currently only lists of values are supported for all the request filtering settings. It would be nice to be able to configure a callable predicate with request argument.

For example it could be used to ignore all requests from staff users:

REQUEST_FILTER=lambda r : not r.user.is_staff

Now it can be done by subclassing RequestFilter, which is not bad, but built-in support would be easier to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions