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

« back to all changes in this revision

Viewing changes to ivle/webapp/errors.py

Replaced Python config files (conf.py) with new config files system, using
    configobj (INI-file style config files).

setup.py config now produces ./etc/ivle.conf, a new-style config file.
ivle/conf/conf.py is now part of the IVLE source code. It reads the new config
file and provides the same legacy interface, so all of IVLE still functions,
including setup.py config.

Added /etc to the source tree (config files will be stored here).
Added configobj as a dependency in doc/setup/install_proc.txt.

setup.py install copies ./etc/ivle.conf into /etc/ivle/ivle.conf.

Removed boilerplate code generation from setup/configure.py (that code is now
part of ivle/conf/conf.py which is now in the source tree).

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