mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
Setting up autodoc for the docs.
For this to work you need to install sphinx in your virtualenv. It's added to the requirements.txt so just run: pip install -r requirements.txt
This commit is contained in:
parent
ab778191c6
commit
2b268eb089
3 changed files with 14 additions and 3 deletions
|
|
@ -6,10 +6,13 @@ This allows it to be built into other forms for easier viewing and browsing.
|
|||
|
||||
To create an HTML version of the docs:
|
||||
|
||||
* Install Sphinx (using ``sudo pip install Sphinx`` or some other method)
|
||||
* Create a virtualenv and activate it.
|
||||
|
||||
* Install all dependencies from requirements.txt inot the virtualenv using
|
||||
``pip install -r requirements.txt`` (this will also install Sphinx).
|
||||
|
||||
* In this docs/ directory, type ``make html`` (or ``make.bat html`` on
|
||||
Windows) at a shell prompt.
|
||||
Windows) at a shell prompt while the virtualenv is active.
|
||||
|
||||
The documentation in _build/html/index.html can then be viewed in a web browser.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,14 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
project_directory = os.path.dirname(
|
||||
os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# having the example project first, so that the settings module will be found
|
||||
sys.path.insert(0, os.path.join(project_directory, 'example'))
|
||||
sys.path.insert(1, project_directory)
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ coverage==3.6
|
|||
django-coverage==1.2.2
|
||||
django-extra-views==0.6.2
|
||||
django-floppyforms==1.1
|
||||
Sphinx==1.2b1
|
||||
|
|
|
|||
Loading…
Reference in a new issue