django-rules
django-rules copied to clipboard
defining new permission through decorator and lazy registration
Hi, I have made a small decorator that permit register lazy (and define) a new permission. Lazy I mean that only when it was used the first time the permission will be stored. Moreover now you can define a new permission through a decorator. Obviously everything have complete backward compatibility and both configuration can coexist (I mean rules.py and decorator together).