Reputation: 3730
When running:
$ make html
I get:
...
/home/app_dir/app1/forms.py:docstring of app1.forms.SomeForm.some_method:3: ERROR: Unknown interpreted text role "method".
...
My method docstring is:
...
This method uses :method:`~app1.forms.other_method` to do other thing.
...
How can I cross-reference this other_method
?
Upvotes: 4
Views: 2672
Reputation: 3730
According to Sphinx Domains a method of an object should be cross-referenced using :py:meth:
The correct docstring would be:
...
This method uses :meth:`~app1.forms.other_method` to do other thing.
...
Note: Python domain is the default so :py:meth:
is the same as :meth:
Upvotes: 3