Thanks I'll give this a try
Jose

 
On 8/7/06, Philip Jenvey <[EMAIL PROTECTED]> wrote:


On Aug 7, 2006, at 2:15 PM, jose wrote:

>
> any links I could look at to see how to use it?
>>
>> There are problems with using the prefix = directive in the config
>> file -- it doesn't correctly set the environment's SCRIPT_NAME.
>>
>> The preferred method of forcing the prefix is to use the newer
>> PrefixMiddleware in the paste.deploy.config module. I'm not sure
>> about the static files problem you're having. PrefixMiddleware might
>> solve it.
>

Unfortunately it's brand new and doesn't have any docs yet, but it's
a typical middleware.

I haven't personally used it yet -- I assume you'll want to add it to
the outermost layer of your middlewares. Here's what the change to
your middleware.py would look like:

--- middleware.py.orig  Mon Aug  7 16:10:36 2006
+++ middleware.py       Mon Aug  7 16:14:02 2006
@@ -2,7 +2,7 @@
from paste.cascade import Cascade
from paste.urlparser import StaticURLParser
from paste.registry import RegistryManager
-from paste.deploy.config import ConfigMiddleware
+from paste.deploy.config import ConfigMiddleware, PrefixMiddleware
from pylons.error import error_template
from pylons.middleware import ErrorHandler, ErrorDocuments,
StaticJavascripts, error_mapper
@@ -53,5 +53,8 @@

     # @@@ Establish the Registry for this application @@@
     app = RegistryManager(app)
+
+    # @@@ This app is served behind a proxy via the following prefix
(SCRIPT_NAME) @@@
+    app = PrefixMiddleware(app, global_conf, prefix='/virtualslides')

     return app

--
Philip Jenvey






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to