You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/04/26 17:31:54 UTC
[2/6] git commit: Getting started with sphinx api docs
Getting started with sphinx api docs
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/670d9624
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/670d9624
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/670d9624
Branch: refs/heads/master
Commit: 670d96245626262a06164ba526c9c2ea994a8814
Parents: b9aaa61
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Fri Apr 12 22:47:06 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Apr 26 15:28:58 2013 +0000
----------------------------------------------------------------------
Allura/allura/app.py | 8 +++++++-
Allura/docs/api/app.rst | 11 +++++++++++
Allura/docs/index.rst | 9 +++++++++
3 files changed, 27 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/670d9624/Allura/allura/app.py
----------------------------------------------------------------------
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index 18dbf59..b89285e 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -208,7 +208,13 @@ class Application(object):
return False
def is_visible_to(self, user):
- '''Whether the user can view the app.'''
+ """Return whether ``user`` can view this app.
+
+ :param user: user to check
+ :type user: :class:`allura.model.User` instance
+ :rtype: bool
+
+ """
return has_access(self, 'read')(user=user)
def subscribe_admins(self):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/670d9624/Allura/docs/api/app.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/api/app.rst b/Allura/docs/api/app.rst
new file mode 100644
index 0000000..688a8fa
--- /dev/null
+++ b/Allura/docs/api/app.rst
@@ -0,0 +1,11 @@
+.. _app_module:
+
+:mod:`allura.app`
+--------------------------------
+
+.. automodule:: allura.app
+
+ .. autoclass:: Application
+ :members:
+ :inherited-members:
+ :undoc-members:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/670d9624/Allura/docs/index.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/index.rst b/Allura/docs/index.rst
index ea20734..5063dac 100644
--- a/Allura/docs/index.rst
+++ b/Allura/docs/index.rst
@@ -58,6 +58,15 @@ Inside the Platform Components
guides/email
guides/permissions
+API Documentation
+==================
+
+.. toctree::
+ :maxdepth: 1
+ :glob:
+
+ api/*
+
Frequently Asked Questions
=====================================================================
.. toctree::