> can somebody give me a hint on how static content is served? I need to
> "embed" the TG2-app into an existing wsgi-app below a certain path - and
> obviously serving e.g. the CSS fails miserably. There was the old way of
> using tg.url and server.webpath (or such) - any such facility available?

Ok, I created a patch for the ticket. It includes rewrites of tg.middleware an 
middleware.py_tmpl (so that the app decides on the static rewriting), and 
tg.url-enclosing of hopefully all relevant template-urls.

Before I attach that, I have some questions I need to have answered:

 - where does the sever.webpath config option actually go? Currently, I've put 
it as this in my development.ini::

  [app:main]
  use = egg:AuthenticationTest
  full_stack = true
  #lang = ru
  cache_dir = %(here)s/data
  beaker.session.key = authenticationtest
  beaker.session.secret = somesecret
  server.webpath = /collaborate

It is accessed using 

pylons.config['app_cfg']['sever.webpath']

 - how is server.webpath supposed to be used? The question arises because of 
the following considerations:

   1) if the TG2-app is one of possibly several below a WSGI-app "mounted" to 
server.webpath, we need to rewrite the PATH_INFO prior to all requests to 
remove the server.webpath. I've done that, and it makes additionally 
adjustments to tg.ext.repoze.who necessary (done them also) because of the 
generated /login and related urls. These need to be prepended with 
server.webpath.

  2) if the TG2-app is below server.webpath in an Apache-environment, it 
*might* be possible to use mod_rewrite to strip of the path-prefix for us, 
thus only the generated urls must 

I've done everything for 1). If 2) is an actual scenario we want to work with, 
it might be necessary to introduce another config-variable called 
server.strip_webpath or so, that controls the adjustment of PATH_INFO.

Diez



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to