dfunckt
dfunckt
I think providing messages at predicate-level a bit too fine-grained and feels like overloading the predicates. I'm not strictly opposed to your suggestion, but I'd have to see a real...
I think a good approach would be to allow a predicate to fail by raising a specific type of exception instead of returning `false` -- `rules` could catch that, turn...
I think a truth table for all possible combinations of operations and return values close to the "Combining predicates" section would be very useful.
I agree it's more "Pythonic" to raise an exception and I have unfortunately no recollection why I made the switch to None. I don't think it's sensible to revert back...
Great stuff! 👍 My only concern is we're changing the structure of the items stored in rule sets -- RuleSets used to be a map of strings to predicates, whereas...
This sounds great to me and it's definitely desirable given Django's native perms also have this ability. I also like the API. Only question is what `verbose_name` should be if...
You need to specify the custom metaclass, see that part of the README again.
Passing the request sounds much more useful, but I wouldn't want to make it a required argument. The request could be passed as a context argument however. For plain rules,...
This looks good, I guess, but it can’t really be importing “rest_framework” like that as it’ll break things for everyone else that only needs to use rules with Django. What’s...
On the other hand, we don’t declare a dependency on Django as well, so the second option might not be too much of a stretch to include.