Hello,

You might need to add a alias to java script library for tosca widget
in site-packages/tw.widgets....something.js

Lucas

On Tue, Mar 10, 2009 at 5:27 AM, Adi <[email protected]> wrote:
>
> Hi,
> I've set up an application using mod_wsgi ; I chose the option not to
> access my app at the root level but under the path '/webcac'.
>
> It works fine except for the resources used by toscawidgets, ie :
>
> 1) for my static files the template renders with code like:
> **** start code ***
> <script type="text/javascript" src="/webcac/static/javascript/
> toggle_div.js"></script>
> which is ok i get my files served.
> **** end code ***
> 2) and for toscawidgets resources it renders like:
> <link rel="stylesheet" type="text/css" href="/webcac/toscawidgets/
> resources/tw.forms/static/calendar/calendar-system.css" media="all" />
> <script type="text/javascript" src="/webcac/toscawidgets/resources/
> tw.forms/static/calendar/calendar.js"></script>
> <script type="text/javascript" src="/webcac/toscawidgets/resources/
> tw.forms/static/calendar/calendar-setup.js"></script>
> <script type="text/javascript" src="/webcac/toscawidgets/resources/
> tw.forms/static/calendar/lang/calendar-fr.js"></script>
>
> Unfortunately the resources seem not to be available at /webcac/
> toscawidgets/resources/... but at /toscawidgets/resources/
>
> Do you know where to inform the system not to add '/webcac' to the
> path for toscawidgets resources?
> somewhere with TW registration command, or maybe a workaround in
> Apache config?
>
> Thanks for your lights
>
> Adrien
>
>
>
> 1) here's the tgcac.wsgi code for mod_wsgi:
>
> **** start code ***
> import sys
> sys.path.append('/usr/local/turbogears/tgcac')
> sys.stdout = sys.stderr
>
> import os
> os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/python-eggs'
>
> import atexit
> import cherrypy
> import cherrypy._cpwsgi
> import turbogears
>
> turbogears.update_config(configfile="/usr/local/turbogears/tgcac/
> dev.cfg", modulename="tgcac.config")
> turbogears.config.update({'global': {'server.environment':
> 'development'}})
> turbogears.config.update({'global': {'autoreload.on': False}})
> turbogears.config.update({'global': {'server.log_to_screen': True}})
>
> import tgcac.controllers
>
> cherrypy.root = tgcac.controllers.Root()
>
> if cherrypy.server.state == 0:
>    atexit.register(cherrypy.server.stop)
>    cherrypy.server.start(init_only=True, server_class=None)
>
> application = cherrypy._cpwsgi.wsgiApp
> *** end code ***
>
> 2) And the tgcac.conf file for apache:
> **** start code ***
> LoadModule wsgi_module modules/mod_wsgi.so
>
> Alias /static /usr/local/turbogears/tgcac/tgcac/static
>
> WSGIScriptAlias /webcac /usr/local/turbogears/tgcac/apache/tgcac.wsgi
>
> <Directory /usr/local/turbogears/tgcac/apache>
> Order deny,allow
> Allow from all
> </Directory>
> *** end code ***
> >
>



-- 
How to create python package?
http://lucasmanual.com/mywiki/PythonPaste
DataHub - create a package that gets, parses, loads, visualizes data
http://lucasmanual.com/mywiki/DataHub

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to