docs/main/MokshaApplications.rst | 15 ++++++-- docs/main/MokshaContainerWidgets.rst | 59 +++++++++++++++++------------------ docs/main/Topics.rst | 2 - 3 files changed, 42 insertions(+), 34 deletions(-)
New commits: commit d1a3ea99db352d964275161654a9d634c548e309 Merge: a0ea17d... 3b96563... Author: Luke Macken lmacken@redhat.com Date: Fri Apr 24 20:04:12 2009 -0400
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/moksha
commit a0ea17d8d95cc13c3183b1bc183c48ac81535876 Author: Luke Macken lmacken@redhat.com Date: Tue Apr 21 00:00:37 2009 -0400
Mention how moksha looks for the model module in your apps
diff --git a/docs/main/MokshaApplications.rst b/docs/main/MokshaApplications.rst index 25ab445..82ea7e0 100644 --- a/docs/main/MokshaApplications.rst +++ b/docs/main/MokshaApplications.rst @@ -32,6 +32,9 @@ your ``setup.py`` under the ``[moksha.application]`` entry-point. myapp = myapplication.controllers.root:RootController
Your TG application will then be accessable via ``/apps/myapp`` in Moksha. +Moksha will also look for a ``model`` module in your application, and will call +the ``init_model`` method within it, if it exists. This is a convention used to +initialize TurboGears2 models.
Installing a ToscaWidget ------------------------
commit 6edbc9c3bb88f8372eba8287ee57bab791c45bdf Author: Luke Macken lmacken@redhat.com Date: Mon Apr 20 23:58:40 2009 -0400
Minor updates to our app documentation
diff --git a/docs/main/MokshaApplications.rst b/docs/main/MokshaApplications.rst index de2acd8..25ab445 100644 --- a/docs/main/MokshaApplications.rst +++ b/docs/main/MokshaApplications.rst @@ -7,8 +7,8 @@ and store them in ``moksha.apps`` and ``moksha._widgets`` dictionaries. These can then be accessed at any time by any application or widget during any request.
-Mounting an existing WSGI application -------------------------------------- +Mounting a WSGI application +---------------------------
You can mount an existing WSGI application by pointing to it in the ``setup.py`` on the ``[moksha.wsgiapp]`` entry-point. @@ -20,8 +20,8 @@ in the ``setup.py`` on the ``[moksha.wsgiapp]`` entry-point.
Your WSGI application will then be accessable via ``/apps/mywsgiapp`` in Moksha.
-Using an existing TurboGears application -------------------------------------------- +Mounting a TurboGears application +----------------------------------
You can easily mount TurboGears Controllers within Moksha by pointing to them in your ``setup.py`` under the ``[moksha.application]`` entry-point. @@ -31,6 +31,8 @@ your ``setup.py`` under the ``[moksha.application]`` entry-point. [moksha.application] myapp = myapplication.controllers.root:RootController
+Your TG application will then be accessable via ``/apps/myapp`` in Moksha. + Installing a ToscaWidget ------------------------
@@ -41,6 +43,8 @@ You can plug an existing ToscaWidget into Moksha by adding it to the ``[moksha.w [moksha.widget] jquery = tw.jquery:jquery_js
+Your Widget will then be accessable via ``/widgets/mywidget`` in Moksha. + Configuration -------------
commit cf51e32b77c4e2e997e8a2ce66fc98bab0dbafcd Author: Luke Macken lmacken@redhat.com Date: Mon Apr 20 23:39:30 2009 -0400
Fix some of the code formatting of our container examples to get syntax highlighting to work.
diff --git a/docs/main/MokshaContainerWidgets.rst b/docs/main/MokshaContainerWidgets.rst index cf6532f..b7bbce6 100644 --- a/docs/main/MokshaContainerWidgets.rst +++ b/docs/main/MokshaContainerWidgets.rst @@ -22,20 +22,21 @@ Here is an example of what a configuration line could look like:
.. code-block:: python
- dashboard_layout = - [Category('Test Applications', [ - MokshaApp('Hello World 1', - 'moksha.helloworld', - {'name':'J5'}), - App('Hello World 2', - '/apps/moksha.helloworld', - {'name':'Luke'}), - MokshaWidget('Hello World 3', + dashboard_layout = [ + Category('Test Applications', [ + MokshaApp('Hello World 1', + 'moksha.helloworld', + {'name': 'J5'}), + App('Hello World 2', + '/apps/moksha.helloworld', + {'name': 'Luke'}), + MokshaWidget('Hello World 3', 'moksha.helloworldwidget', - {'name':'Anonymous'}, auth=Not(not_anonymous())) - ] - ) - ] + {'name': 'Anonymous'}, + auth=Not(not_anonymous())), + ] + ) + ]
This would be a configuration for the dashboard container discussed bellow. It defines one category, two applications and a widget. How this is laid out
commit bebf051c0c1e320ffe8b08b9ac5e93ad719dc565 Author: Luke Macken lmacken@redhat.com Date: Mon Apr 20 23:35:48 2009 -0400
Fix some whitespace problems in our container code documentation
diff --git a/docs/main/MokshaContainerWidgets.rst b/docs/main/MokshaContainerWidgets.rst index 0387a19..cf6532f 100644 --- a/docs/main/MokshaContainerWidgets.rst +++ b/docs/main/MokshaContainerWidgets.rst @@ -156,22 +156,22 @@ homepage.py from moksha.api.widgets.containers import DashboardContainer
class HomePageContainer(DashboardContainer): - template = 'mako:myapp.templates.homepagecontainer' - layout = [Category('left-content-column', - [App('Banner', '/static-html/sitebanner.html'), - MokshaApp('Stable Updates','myapp.updates/table', - {"some_json":'{"status":"stable"}'} - ), - MokshaApp('Testing Updates','myapp.updates/table', - {"some_json":'{"status":"testing"}'} - ), - ]), - Category('right-content-column', - MokshaWidget(None, 'myapp.loginwidget', - auth=Not(not_anonymous()) - ) - ) - ] + template = 'mako:myapp.templates.homepagecontainer' + layout = [Category('left-content-column', + [App('Banner', '/static-html/sitebanner.html'), + MokshaApp('Stable Updates','myapp.updates/table', + {"some_json":'{"status":"stable"}'} + ), + MokshaApp('Testing Updates','myapp.updates/table', + {"some_json":'{"status":"testing"}'} + ), + ]), + Category('right-content-column', + MokshaWidget(None, 'myapp.loginwidget', + auth=Not(not_anonymous()) + ) + ) + ]
homepagecontainer.mak
commit d27356060577e8465878add652beb8f75c216e1b Author: Luke Macken lmacken@redhat.com Date: Mon Apr 20 23:34:20 2009 -0400
Some more inter-doc linkage
diff --git a/docs/main/Topics.rst b/docs/main/Topics.rst index 4709036..79e7180 100644 --- a/docs/main/Topics.rst +++ b/docs/main/Topics.rst @@ -11,4 +11,4 @@ potentially be represented by a a STOMP destination, or even an AMQP message queue. These messaging backends can be swapped out and configured without having to alter the applications that care about those `topics`.
-For details on how to interact with topics, see the documentation on `Consumers`, `DataStreams`, and the `MokshaHub`. +For details on how to interact with topics, see the documentation on :doc:`Consumers`, :doc:`DataStreams`, and :doc:`MokshaHub`.
moksha-commits@lists.fedorahosted.org