GAE Path to jquery and other libs is wrong in the admin app (2.9.11)

66 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

lpg

nieprzeczytany,
2 paź 2014, 10:30:112.10.2014
do web2py-d...@googlegroups.com
Referencing this thread from users here.
https://groups.google.com/forum/#!topic/web2py/JiQfUeeIoaE

I'm using 2.9.11 with the new "web2py.py -G config" . My expectation is that it should just work without having to edit lines in app.yaml. Or is there something undocumented I'm missing here? Or is it a bug in -G?

lpg

nieprzeczytany,
2 paź 2014, 13:14:532.10.2014
do web2py-d...@googlegroups.com
Seems there's more than one thread on the topic:

lpg

nieprzeczytany,
6 paź 2014, 14:56:106.10.2014
do web2py-d...@googlegroups.com
No one else?
@niphlod is there some documentation I'm missing here?

Niphlod

nieprzeczytany,
6 paź 2014, 15:23:336.10.2014
do web2py-d...@googlegroups.com
-G is pretty new to me. Also, app.yaml is kinda obscure in google docs about possible "rewrite rules" that will help serving static files when "decorated" by static_version.

tl;dr: I'm glad to help but without having a real app and a real gae env it'll all be speculations

lpg

nieprzeczytany,
7 paź 2014, 14:38:517.10.2014
do web2py-d...@googlegroups.com
Thanks. I have set up a GAE environment and web2py repo. I'm happy to have you test over there. I'll send you the info by email.

Niphlod

nieprzeczytany,
7 paź 2014, 17:22:247.10.2014
do web2py-d...@googlegroups.com
received the mail, will look into it ASAP.

Niphlod

nieprzeczytany,
7 paź 2014, 18:00:297.10.2014
do web2py-d...@googlegroups.com
DAMN GAE.
It seems that repetitions (both needed or optional) are ignored if not captured in a grouping.

This is surfacing now because we didn't have any x.y.z release where either of x, y or z were two digits instead of one.

Summary:
this was plain wrong
/(.+?)/static/_\d.\d.\d\/(.+)
as in regex terms wouldn't had allowed you to use (using x.y.z as the example) to have a x.y.zz.

/(.+?)/static/_[\d]+\.[\d]+\.[\d]+/(.+)
is more correct from a regex POV, because sintactically it allows you to have AT LEAST one digit for every x, y, or z, ("+" is "one or more"). Unfortunately, GAE seems to NOT respect regex syntax and maps correcly x.y.z but not xx.yy.zz nor xx.y.z nor x.y.zz

/(.+?)/static/_(\d+\.\d+\.\d+)/(.+)
this is exactly as before, but the _1.2.3 part is now part of a grouping. This means that the backreferences must be shifted (static_files: applications/\1/static/\3 instead of static_files: applications/\1/static/\2). But in now the "rewrite" works, while the previous didn't


in regex terms, this means that _1.2.3 NEEDS to be in a group to allow both _1.2.3 and _123.123.123 to work fine. Strangely enough the regex syntax (that is documented to work fine) doesn't work if not inside a grouping.

Niphlod

nieprzeczytany,
2 lis 2014, 09:33:102.11.2014
do web2py-d...@googlegroups.com
@lpg: did you test the new configuration throughly (especially the skip_files part) ?
if yes we should update the one in examples with the new one on the repo.
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0