__init__.py 561 B

123456789101112131415161718192021222324252627
  1. from django.core.exceptions import PermissionDenied as DjPermissionDenied
  2. from django.http import Http404 as DjHttp404
  3. __all__ = ["Http404", "OutdatedUrl", "PermissionDenied"]
  4. class Http404(DjHttp404):
  5. """The requested page could not be found"""
  6. pass
  7. class OutdatedUrl(Exception):
  8. """The url that was used to reach view contained outdated slug"""
  9. pass
  10. class PermissionDenied(DjPermissionDenied):
  11. """The user did not have permission to do that"""
  12. pass
  13. MISAGO_EXCEPTIONS = (
  14. Http404,
  15. OutdatedUrl,
  16. PermissionDenied,
  17. )