Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improvements on the documentation

Add a note on the installation directory in INSTALL file
Remove spelling errors
Remove warnings of sphinx-build
  • Loading branch information...
commit f5a7ed96442bcded129c85d6fae2b67a9d7505c7 1 parent acbe442
@swagten swagten authored
View
3  INSTALL
@@ -17,6 +17,9 @@ After checking out, type the following command:
python setup.py develop
You need setuptools for this to work.
+If the installation directory is a system-owned directory (for instance,
+/usr/lib/python2.7/site-packages), then you need to run the above command
+as root.
DOCUMENTATION
View
6 wsgiservice/application.py
@@ -74,12 +74,12 @@ def _log_request(self, request):
for d in self.LOG_HEADERS:
if d in request.headers and request.headers[d]:
msg.append(d + ': ' + repr(request.headers[d]))
- logger.info("Reqest information: %s", ', '.join(msg))
+ logger.info("Request information: %s", ', '.join(msg))
def _handle_request(self, request):
"""Finds the resource to which a request maps and then calls it.
Instantiates, fills and returns a :class:`webob.Response` object. If
- no resource matches the request, a 404 status is set on the responrce
+ no resource matches the request, a 404 status is set on the response
object.
:param request: Object representing the current request.
@@ -111,7 +111,7 @@ def get_app(defs, add_help=True):
of this dictionary is used as application resource. The other
values are discarded.
:type defs: dict
- :param add_help: Wether to add the Help resource which will expose the
+ :param add_help: Whether to add the Help resource which will expose the
documentation of this service at /_internal/help
:type add_help: boolean
:rtype: :class:`Application`
View
2  wsgiservice/decorators.py
@@ -6,7 +6,7 @@
def mount(path):
"""Decorator. Apply on a :class:`wsgiservice.Resource` to mount it at the
- given path. The same can be achived by setting the ``_path`` attribute on
+ given path. The same can be achieved by setting the ``_path`` attribute on
the class directly.
:param path: A path to mount this resource on. See
View
16 wsgiservice/resource.py
@@ -14,7 +14,7 @@
class Resource(object):
- """Base class for all WsgiService resources. A resourse is a unique REST
+ """Base class for all WsgiService resources. A resource is a unique REST
endpoint which accepts different methods for different actions.
For each HTTP call the corresponding method (equal to the HTTP method)
@@ -50,7 +50,7 @@ class Resource(object):
#: browsers don't cause too many exceptions.
IGNORED_PATHS = ('/favicon.ico', '/robots.txt')
- #: Wether the input parameters from GET and POST should be decoded
+ #: Whether the input parameters from GET and POST should be decoded
#: according to the encoding specified by the request. This should only be
#: changed to False if the input is supposed to be byte values. (Default:
#: True)
@@ -66,7 +66,7 @@ class Resource(object):
path_params = None
#: String with the current path. Same as request.path except the extension
- #: is removed. So instead of `/movies.json' it is just `/movies'. Set by
+ #: is removed. So instead of '/movies.json' it is just '/movies'. Set by
#: the constructor.
request_path = None
@@ -78,7 +78,7 @@ class Resource(object):
charset = 'UTF-8'
def __init__(self, request, response, path_params, application=None):
- """Constructor. Order of the parameters is not guarantteed, always
+ """Constructor. Order of the parameters is not guaranteed, always
used named parameters.
:param request: Object representing the current request.
@@ -501,7 +501,7 @@ def to_text_xml(self, raw):
:func:`_get_xml_value` which applies some heuristics for converting
data to XML.
- The default root tag is 'response', but that can be overwritting by
+ The default root tag is 'response', but that can be overwritten by
changing the :attr:`XML_ROOT_TAG` instance variable.
Uses :func:`wsgiservice.xmlserializer.dumps()` for the actual work.
@@ -522,7 +522,7 @@ def handle_exception(self, e, status=500):
:type status: int
"""
logger.exception(
- "An exception occured while handling the request: %s", e)
+ "An exception occurred while handling the request: %s", e)
self.response.body_raw = {'error': str(e)}
self.response.status = status
@@ -534,7 +534,7 @@ def handle_exception_404(self, e):
:type e: :class:`Exception`
"""
logger.exception(
- "A 404 Not Found exception occured while handling the request.")
+ "A 404 Not Found exception occurred while handling the request.")
self.response.body_raw = {'error': 'Not Found'}
self.response.status = 404
@@ -695,7 +695,7 @@ def to_text_html(self, raw):
:type raw: Any valid Python object
:rtype: string
- .. todo:: Treat pragraphs and/or newlines better in output.
+ .. todo:: Treat paragraphs and/or newlines better in output.
"""
retval = ["""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Please sign in to comment.
Something went wrong with that request. Please try again.