Permalink
Browse files

Improved registration debug log message

  • Loading branch information...
1 parent d92773d commit 4543b43d4f0d99868527272110cdeedb1ed6dd2c @jpic jpic committed Dec 11, 2012
Showing with 5 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +4 −0 rules_light/registry.py
View
1 CHANGELOG
@@ -2,6 +2,7 @@
- Added is_authenticated and is_staff shortcuts,
- Added make_decorator which enables decorating rules with other rules.
+- Improved registration debug log messages with bools.
0.0.4 Django 1.4 compatibility
View
4 rules_light/registry.py
@@ -102,6 +102,10 @@ def as_text(self, user, name, *args, **kwargs):
def rule_text_name(self, rule):
if hasattr(rule, 'func_name'):
return rule.func_name
+ elif rule is True:
+ return u'True'
+ elif rule is False:
+ return u'False'
elif hasattr(rule, '__class__'):
return rule.__class__.__name__
elif hasattr(rule, '__name__'):

0 comments on commit 4543b43

Please sign in to comment.