http: Improve router attribute docstrings
This commit is contained in:
parent
1838f10dcf
commit
a318fd8698
@ -60,11 +60,27 @@ class Router(object):
|
||||
:param config: dict structure of the entire Mopidy configuration
|
||||
"""
|
||||
|
||||
#: Name of the HTTP router implementation, must be overridden.
|
||||
name = None
|
||||
"""Name of the HTTP router.
|
||||
|
||||
Must be overridden by all subclasses.
|
||||
|
||||
This should be the same as the ``ext_name`` of the Mopidy extension
|
||||
implementing an HTTP router. The :attr:`name` will be used to namespace all
|
||||
URLs handled by this router.
|
||||
|
||||
For example, if :attr:`name` is ``soundspot``, then the router will manage
|
||||
all requests starting with ``http://localhost:6680/soundspot``.
|
||||
"""
|
||||
|
||||
#: Path to location of static files to be served.
|
||||
static_file_path = None
|
||||
"""Path to location of static files to be served.
|
||||
|
||||
If you only need to serve static files, set this attribute and use the
|
||||
default implementation of :meth:`get_request_handlers`.
|
||||
|
||||
If you override :meth:`get_request_handlers` this attribute is not used.
|
||||
"""
|
||||
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
|
||||
Loading…
Reference in New Issue
Block a user