Sphinx cross reference question

L

Laszlo Nagy

In my shopzeus.db.pivot.convert.py file, in the run() method of my
Data2Facts class, I can write this into the docstring:


class Data2Facts(threading.Thread):
# code here...
def prepare(self,*args):
# code here...
# more code here
def run(self):
"""
Start data conversion.

You need to call :meth:`prepare` before starting the
conversion with :meth:`run`.
"""
# more code here...

This works perfectly - it places cross links in the HTML documentation.

I have another file where I'm writting a tutorial for my Data2Facts
class. It is not the API, but I would like to make references to the API.

So I can do this:


The :meth:`shopzeus.db.pivot.convert.Data2Facts.prepare` method is used
for blablabla....

However, I do not want to write "shopzeus.db.pivot.convert." every time.
I want to make this my current module for cross-referencing. So I tried
this:

... :currentmodule:: shopzeus.db.pivot.convert

The :meth:`Data2Facts.prepare` method is used for blablabla....

But it does not work! It is displayed in bold, but there is no link. The
sphinx build command does not give me any warnings about invalid
references. What am I doing wrong?

Thanks,

Laszlo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,255
Members
46,852
Latest member
CarlaDowle

Latest Threads

Top