docs/main/GettingStarted.rst | 2 +- moksha/api/menus/default.py | 8 +++----- moksha/controllers/root.py | 14 ++++++++------ moksha/lib/base.py | 4 +++- moksha/widgetbrowser/widgetbrowser/wsgiapp.py | 6 ++++++ 5 files changed, 21 insertions(+), 13 deletions(-)
New commits: commit 5bcfac34a2b60b28cf17479aaa637a233988bdcf Author: Luke Macken lmacken@redhat.com Date: Fri Feb 6 03:19:07 2009 -0500
Inject moksha's global resources into widget demos
diff --git a/moksha/widgetbrowser/widgetbrowser/wsgiapp.py b/moksha/widgetbrowser/widgetbrowser/wsgiapp.py index 266a826..600d8b2 100644 --- a/moksha/widgetbrowser/widgetbrowser/wsgiapp.py +++ b/moksha/widgetbrowser/widgetbrowser/wsgiapp.py @@ -218,6 +218,12 @@ class WidgetBrowser(object): widget_output = util.display_widget(widget, _disp, self.context) if not callable(widget_output): widget_output = Markup(widget_output) + + # Inject moksha's global resources so we can get things like + # Orbited/Stomp/jQuery/etc. + from moksha.api.widgets.global_resources import global_resources + global_resources.register_resources() + return self.render('show_widget.html', locals())
def widgets(self, req, resp):
commit 07ccbcb484d9e90971e59719df609091324fcece Author: Luke Macken lmacken@redhat.com Date: Fri Feb 6 03:18:16 2009 -0500
Mount the ToscaWidgets WidgetBrowser at /docs
diff --git a/moksha/controllers/root.py b/moksha/controllers/root.py index 2938dc1..8d3bbb8 100644 --- a/moksha/controllers/root.py +++ b/moksha/controllers/root.py @@ -36,8 +36,9 @@ from moksha.controllers.apps import AppController from moksha.widgets.container import MokshaContainer container = MokshaContainer('moksha_container')
-#import os -#os.putenv('TW_BROWSER_PREFIX', '/docs') +# So we can mount the WidgetBrowser as /docs +import os +os.environ['TW_BROWSER_PREFIX'] = '/docs'
class RootController(BaseController):
@@ -46,11 +47,12 @@ class RootController(BaseController): #admin = AdminController()
# ToscaWidgets WidgetBrowser integration - widget = WSGIAppController( + docs = WSGIAppController( WidgetBrowser( - template_dirs=[resource_filename('moksha','templates/widget_browser')], - full_stack=False, - docs_dir=config.get('docs_dir', 'docs'))) + template_dirs=[ + resource_filename('moksha','templates/widget_browser')], + docs_dir=config.get('docs_dir', 'docs'), + full_stack=False))
@expose('mako:moksha.templates.index') def index(self): diff --git a/moksha/lib/base.py b/moksha/lib/base.py index 8332c1d..7d77a1b 100644 --- a/moksha/lib/base.py +++ b/moksha/lib/base.py @@ -44,7 +44,9 @@ class BaseController(TGController): tmpl_context.get_url = url
## Inject our global resources - if request.path.startswith('/appz') or request.path.startswith('/widgets'): + if request.path.startswith('/appz') or \ + request.path.startswith('/widgets') or \ + request.path.startswith('/docs'): # Don't inject global resources for apps or widgets. tmpl_context.moksha_global_resources = lambda: '' else:
commit ed8ae155b4fc7f190d9497ae45163c2c8a1b61e8 Author: Luke Macken lmacken@redhat.com Date: Fri Feb 6 03:17:28 2009 -0500
Link to our internal live sphinx documentation in our menus
diff --git a/moksha/api/menus/default.py b/moksha/api/menus/default.py index e7e0628..14ecd33 100644 --- a/moksha/api/menus/default.py +++ b/moksha/api/menus/default.py @@ -26,15 +26,14 @@ class MokshaContextMenu(MokshaContextualMenu): <a rel="text"> <img src="/images/moksha-icon.png" style="position:absolute;margin-top:-20px; margin-left:-25px;margin-bottom:10px"/><br/> </a> - <a href="http://moksha.fedorahosted.org" target="_blank">Moksha Homepage</a> <a href="/widget">Documentation</a> <a href="https://fedorahosted.org/moksha/report/3">Tickets</a> <a href="https://fedorahosted.org/moksha/">Wiki</a> """
- class MokshaDefaultMenu(MokshaMenu): - menus = ['Moksha', 'Applications', 'Widgets', 'Fedora'] + menus = ['Moksha', 'Widgets', 'Fedora'] + #menus = ['Moksha', 'Applications', 'Widgets', 'Fedora']
def applications(self, *args, **kw): menu = """ @@ -67,8 +66,7 @@ class MokshaDefaultMenu(MokshaMenu): <br>Moksha is a platform for creating live collaborative web applications.<br><br> </a> <a rel="separator"></a> - <a href="http://moksha.fedorahosted.org" target="_blank">Moksha Homepage</a> - <a href="/widget">Documentation</a> + <a href="/docs/">Documentation</a> <a href="https://fedorahosted.org/moksha/report/3">Tickets</a> <a href="https://fedorahosted.org/moksha/">Wiki</a> """
commit c7b73b8291c25c2eb0b9d51e1c3e509307dcc606 Author: Luke Macken lmacken@redhat.com Date: Fri Feb 6 03:04:32 2009 -0500
For some reason we need pysvn and mercurial now :(
diff --git a/docs/main/GettingStarted.rst b/docs/main/GettingStarted.rst index 8ed2247..7fc7774 100644 --- a/docs/main/GettingStarted.rst +++ b/docs/main/GettingStarted.rst @@ -24,7 +24,7 @@ You'll need the `virtualenv http://pypi.python.org/pypi/virtualenv`_ package.
.. code-block:: bash
- # yum -y install python-virtualenv + # yum -y install python-virtualenv pysvn mercurial
The `start-moksha` script mentioned below should install all of the necessary dependencies. However, it will attempt to compile a few things, such as lxml. So, you may need to install some additional dependencies like `libxml2` and `libxslt` in order to build it. If you're using yum, you can easily install all of the build requirements by doing: