diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-11-24 01:32:54 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-11-24 01:32:54 -0500 |
commit | f416fa800d156141cce7a5f0cdd8576b1a276ab5 (patch) | |
tree | 790cbf03e252bd46d61778cee0172549896986be /askbot/exceptions.py | |
parent | 2f9594a522a551a35d12aa7697a0a7bf41237020 (diff) | |
download | askbot-f416fa800d156141cce7a5f0cdd8576b1a276ab5.tar.gz askbot-f416fa800d156141cce7a5f0cdd8576b1a276ab5.tar.bz2 askbot-f416fa800d156141cce7a5f0cdd8576b1a276ab5.zip |
comment editing works
Diffstat (limited to 'askbot/exceptions.py')
-rw-r--r-- | askbot/exceptions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/askbot/exceptions.py b/askbot/exceptions.py index eb4541bd..ed60cc8a 100644 --- a/askbot/exceptions.py +++ b/askbot/exceptions.py @@ -1,4 +1,13 @@ from django.core import exceptions +from django.utils.translation import ugettext as _ + +class LoginRequired(exceptions.PermissionDenied): + """raised when an operation required a logged + in user""" + def __init__(self, msg = None): + if msg is None: + msg = _('Sorry, but anonymous visitors cannot access this function') + super(LoginRequired, self).__init__(msg) class InsufficientReputation(exceptions.PermissionDenied): """exception class to indicate that permission |