Hi Jose,
The problem is that StaticURLParser keeps some variables with / path
separators and \ characters with others if you don't specify the
root_directory on Windows.
The solution on Windows is to specify both the directory and the
root_directory when setting up the static file parser and ensure they
use Windows \ separators.
In your Pylons project config/middleware.py change this line:
static_app = StaticURLParser(..)
to this:
static_app = StaticURLParser(
directory=config.paths['static_files'].replace('/','\\'),
root_directory=config.paths['static_files'].replace('/','\\')
)
Then everything should work.
Cheers,
James
James Gardner wrote:
> Hi Jose,
>
> I get the same problem. No doubt something to do with Windows paths.
> First thing to do is see if it is a Pylons or Paste problem so I'll do
> some checks.
>
> Cheers,
>
> James
>
>>> I just tried the removing all the spaces from my paths and it still does
>>> not work. I'm also not getting much in the way of helpful error messages
>>> so I really can't provide much more info. Here is my setup, just to see
>>> if that helps:
>>>
>>> OS winXP sp2
>>> processer AMD Athlon 64 3200+
>>> memory 2 GIG
>>> AV bitdefender 10
>>>
>>> test:
>>> from the command prompt I typed
>>> paster create --template=pylons space
>>> cd space
>>> paster serve development.ini
>>>
>>> opened browser to localhost:5000 and I get a 404 error
>>>
>>> Any ideas how to debug this? everything worked fine with 1.0, I've not
>>> tried the 1.0.1 yet but will and report back
>>> Jose
>>>
>>>
>> It works as expected with paste 1.0.1 but not 1.1. this is with nothing
>> odd in the urls or paths only normal ascii and no spaces. what should I
>> look at to hunt down the problem?
>> Jose
>>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---