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

« back to all changes in this revision

Viewing changes to ivle/webapp/errors.py

ivle.webapp.tutorial.exercise.html: Remove an unnecessary XInclude NS
    definition. Fix some whitespace in a textarea, and a JS typo.

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'
25
24
    code = 400
26
25
 
27
26
class Forbidden(HTTPError):
28
 
    codename = 'Forbidden'
29
27
    code = 403
30
28
 
31
29
class NotFound(HTTPError):
32
 
    codename = 'Not Found'
33
30
    code = 404
34
31
 
35
32
class MethodNotAllowed(HTTPError):
36
 
    def __init__(self, allowed, *args, **kwargs):
37
 
        self.allowed = allowed
38
 
        super(HTTPError, self).__init__(*args, **kwargs)
39
 
 
40
 
    codename = 'Method Not Allowed'
41
33
    code = 405