django sphinx automodule -- basics

Posted by haras.pl on Stack Overflow See other posts from Stack Overflow or by haras.pl
Published on 2011-03-14T16:07:35Z Indexed on 2011/03/14 16:10 UTC
Read the original article Hit count: 422

Filed under:
|
|
|

Hi,

I have a projects with several large apps and where settings and apps files are split.

directory structure goes something like that:

project_name

  • __init__.py
  • apps
    • __init__.py
    • app1
    • app2
  • 3rdparty
    • __init__.py
    • lib1
    • lib2
  • settings
    • __init__.py
    • installed_apps.py
    • path.py
    • templates.py
    • locale.py
    • ...
  • urls.py

every app is like that

  • __init__.py
  • admin
    • __init__.py
    • file1.py
    • file2.py
  • models
    • __init__.py
    • model1.py
    • model2.py
  • tests
    • __init__.py
    • test1.py
    • test2.py
  • views
    • __init__.py
    • view1.py
    • view2.py
  • urls.py

how to use a sphinx to autogenerate documentation for that?

I want something like that for each in settings module or INSTALLED_APPS (not starting with django.* or 3rdparty.*) give me a auto documentation output based on docstring

and autogen documentation and run tests before git commit

btw. I tried doing .rst files by hand with

.. automodule:: module_name
   :members:

but is sucks for such a big project, and it does not works for settings

Is there an autogen method or something?

I am not tied to sphinx, is there a better solution for my problem?

© Stack Overflow or respective owner

Related posts about python

Related posts about django