~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/errors.py

  • Committer: Nick Chadwick
  • Date: 2009-02-24 05:22:21 UTC
  • mto: (1099.1.227 exercise-ui)
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090224052221-xws3fir8gg46ovvz
Modifief exercise view, so that exercises can now be viewed in an
expandable javascript style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    '''A base class for all HTTP errors.'''
22
22
 
23
23
class BadRequest(HTTPError):
 
24
    codename = 'Bad Request'
24
25
    code = 400
25
26
 
 
27
class Unauthorized(HTTPError):
 
28
    codename = 'Unauthorized'
 
29
    code = 401
 
30
 
26
31
class Forbidden(HTTPError):
 
32
    codename = 'Forbidden'
27
33
    code = 403
28
34
 
29
35
class NotFound(HTTPError):
 
36
    codename = 'Not Found'
30
37
    code = 404
31
38
 
32
39
class MethodNotAllowed(HTTPError):
34
41
        self.allowed = allowed
35
42
        super(HTTPError, self).__init__(*args, **kwargs)
36
43
 
 
44
    codename = 'Method Not Allowed'
37
45
    code = 405