Closed WoosterInitiative closed 1 week ago
Intead of explicitly choosing which roles to include, get all except for those that have been excluded with exclude.
exclude
CRUDView.get_urls(exclude=[Role.LIST])
Will raise exception if both roles and exclude are provided. exclude is a named parameter.
roles
FWIW a comprehension will give you want you're looking for without the need for the extra option...
roles=[r for r in Role if r != Role.LIST]
Intead of explicitly choosing which roles to include, get all except for those that have been excluded with
exclude
.Will raise exception if both
roles
andexclude
are provided.exclude
is a named parameter.