summaryrefslogtreecommitdiffstats
path: root/askbot/exceptions.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-11-24 01:32:54 -0500
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-11-24 01:32:54 -0500
commitf416fa800d156141cce7a5f0cdd8576b1a276ab5 (patch)
tree790cbf03e252bd46d61778cee0172549896986be /askbot/exceptions.py
parent2f9594a522a551a35d12aa7697a0a7bf41237020 (diff)
downloadaskbot-f416fa800d156141cce7a5f0cdd8576b1a276ab5.tar.gz
askbot-f416fa800d156141cce7a5f0cdd8576b1a276ab5.tar.bz2
askbot-f416fa800d156141cce7a5f0cdd8576b1a276ab5.zip
comment editing works
Diffstat (limited to 'askbot/exceptions.py')
-rw-r--r--askbot/exceptions.py9
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