Hi howesc,
Thanks for your reply!
I tried to set the regex for my needs, but I guess that I am wrong in
something.
I edited the regex in this way:
> - url: /(?P<a>.+?)/static/\w\{2}?/(?P<b>.+)
> static_files: applications/\1/static/\2
> upload: applications/(.+?)/static/(.+)
> secure: optional
>
Now, instead of an error, I get 2 warnings for each static file:
WARNING 2012-11-13 13:54:19,604 dev_appserver_import_hook.py:595] Blocking
> access to static file
> "/home/dapids/web2py/applications/myapp/static/en/css/bootstrap-responsive.min.css"
WARNING 2012-11-13 13:54:19,604 dev_appserver_import_hook.py:595] Blocking
> access to static file
> "/home/dapids/web2py/applications/myapp/static/css/bootstrap-responsive.min.css"
>
Any thoughts?
Cheers,
David
On 12 November 2012 23:03, howesc <[email protected]> wrote:
> i don't know the full deal with the router....but it looks like the path
> to the static files is incorrect (notice the 'en' in the path). you can
> strip this out in app.yaml (my example strips out a random cache busting
> param after the 'static/' in the path, you can modify the regex to meet
> your needs):
>
> - url: /(?P<a>.+?)/static/.*?/(?P<b>.+)
> static_files: applications/\1/static/\2
> upload: applications/(.+?)/static/(.+)
> secure: optional
> expiration: "1d"
>
> cfh
>
>
> On Monday, November 12, 2012 7:19:32 AM UTC-8, David Sorrentino wrote:
>>
>> Hello everybody! :)
>>
>> I am developing a multi-language website deployed on GAE.
>> For my routes.py I would like to use this configuration, shown on the
>> online book (http://web2py.com/books/**default/chapter/29/04#**
>> Parameter-based-system<http://web2py.com/books/default/chapter/29/04#Parameter-based-system>
>> ):
>>
>> routers = dict(
>> BASE = dict(default_application='**myapp'),
>> myapp = dict(languages=['en', 'it', 'jp'], default_language='en'),
>> )
>>
>> However, it looks like I am having some troubles with loading the static
>> files. Indeed static files are not loaded and the console shows the
>> following error:
>> [Errno 2] No such file or directory: '/home/dapids/web2py/**
>> applications/myapp/en/static/**css/bootstrap-responsive.min.**css'
>>
>> Am I doing something wrong?
>>
>> Cheers,
>> David
>>
> --
>
>
>
>
--