Bonsoir,
Je ne parviens pas à utiliser correctement l’autodoc avec Sphinx.
Voici ma structure :
1 2 3 4 5 6 7 8 9 10 11 12 13 | projet --- app1 ------ models.py ------ views.py --- app2 --- app3 docs --- modules ------ models.rst --- conf.py --- index.rst __init__.py manage.py |
conf.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import os import sys sys.path.insert(0, os.path.abspath('..')) from django.conf import settings settings.configure() import django django.setup() # -- General configuration ------------------------------------------------ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' |
models.rst
1 2 3 4 5 | Models ====== .. automodule:: projet.app1.models :members: :undoc-members: |
Cependant voici l’erreur que j’obtiens :
Une idée ?
Merci
+0
-0