Fix the wsmeext.sphinxext module name

--HG--
extra : rebase_source : 028505829909b5b6445b40e67aa1e70a9f46e1a5
This commit is contained in:
Christophe de Vienne 2013-01-18 11:05:05 +01:00
parent c32a19e298
commit bfccf11cb5
5 changed files with 19 additions and 19 deletions

View File

@ -57,7 +57,7 @@ Main features
- Very few runtime dependencies: webob, simplegeneric
(+ Genshi if you use SOAP).
- Integration in `Sphinx`_ for making clean documentation with
wsme.sphinxext (work in progress).
``wsmeext.sphinxext``.
.. _Pecan: http://pecanpy.org/
.. _TurboGears: http://www.turbogears.org/

View File

@ -25,7 +25,7 @@ sys.path.insert(0, os.path.abspath('..'))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'wsme.sphinxext',
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'wsmeext.sphinxext',
'sphinx.ext.intersphinx']
# Add any paths that contain templates here, relative to this directory.

View File

@ -10,12 +10,12 @@ Install the extension
Here we consider that you already quick-started a sphinx project.
#. In your ``conf.py`` file, add ``'wsme.sphinxext'`` to you extensions,
#. In your ``conf.py`` file, add ``'ext'`` to you extensions,
and optionally set the enabled protocols.
.. code-block:: python
extensions = ['wsme.sphinxext']
extensions = ['ext']
wsme_protocols = ['restjson', 'restxml', 'extdirect']
@ -93,7 +93,7 @@ Example
* - .. code-block:: rst
.. wsme:root:: wsme.sphinxext.SampleService
.. wsme:root:: wsmeext.sphinxext.SampleService
:webpath: /api
.. wsme:type:: MyType
@ -106,7 +106,7 @@ Example
.. wsme:function:: doit
- .. wsme:root:: wsme.sphinxext.SampleService
- .. wsme:root:: wsmeext.sphinxext.SampleService
:webpath: /api
.. wsme:type:: MyType
@ -150,7 +150,7 @@ Full Example
Python source
~~~~~~~~~~~~~
.. literalinclude:: ../wsme/sphinxext.py
.. literalinclude:: ../wsmeext/sphinxext.py
:lines: 42-67
:language: python
@ -159,27 +159,27 @@ Documentation source
.. code-block:: rst
.. default-domain:: wsme
.. default-domain:: wsmeext
.. autotype:: wsme.sphinxext.SampleType
.. autotype:: wsmeext.sphinxext.SampleType
:members:
.. autoservice:: wsme.sphinxext.SampleService
.. autoservice:: wsmeext.sphinxext.SampleService
:members:
Result
~~~~~~
.. default-domain:: wsme
.. default-domain:: wsmeext
.. type:: int
An integer
.. autotype:: wsme.sphinxext.SampleType
.. autotype:: wsmeext.sphinxext.SampleType
:members:
.. autoservice:: wsme.sphinxext.SampleService
.. autoservice:: wsmeext.sphinxext.SampleService
:members:

View File

@ -81,8 +81,8 @@ or needs to validate data integrity.
To define a user type, you just have to inherit from
:class:`wsme.types.UserType` and instanciate your new class. This instance
will be your new type and can be used as @:class:`wsme.expose` or
@:class:`wsme.validate` parameters.
will be your new type and can be used as @\ :class:`wsme.expose` or
@\ :class:`wsme.validate` parameters.
Note that protocols can choose to specifically handle a user type or
a base class of user types. This is case with the two pre-defined

View File

@ -253,9 +253,9 @@ class TypeDocumenter(autodoc.ClassDocumenter):
content.extend((
u' ' * 8 + line for line in sample.split('\n')))
for line in content:
self.add_line(line, u'<wsme.sphinxext')
self.add_line(line, u'<wsmeext.sphinxext')
self.add_line(u'', '<wsme.sphinxext>')
self.add_line(u'', '<wsmeext.sphinxext>')
if samples_slot == 'after-docstring':
add_docstring()
@ -284,9 +284,9 @@ class AttributeDocumenter(autodoc.AttributeDocumenter):
def add_content(self, more_content, no_docstring=False):
self.add_line(
u':type: %s' % datatypename(self.datatype),
'<wsme.sphinxext>'
'<wsmeext.sphinxext>'
)
self.add_line(u'', '<wsme.sphinxext>')
self.add_line(u'', '<wsmeext.sphinxext>')
super(AttributeDocumenter, self).add_content(
more_content, no_docstring)