web2py.py -G configure issues? Trouble with /admin on GAE

97 views
Skip to first unread message

lpg

unread,
Oct 1, 2014, 7:25:33 PM10/1/14
to web...@googlegroups.com
Testing the latest 2.9.11 on GAE, seems like /admin app is breaking, since many static resources can't be found.
I used the new web2py.py -G  configure.
However it seems like the .yaml may not have all the static routes?

See Screenshot here:

And here:
https://www.dropbox.com/s/ywk8spbyd79oah2/Screenshot%202014-10-01%2019.21.34.png?dl=0

Miguel Goncalves

unread,
Oct 2, 2014, 9:47:55 AM10/2/14
to web2py-users
Try to do comment the 2dn url line in the the app.yaml :

handlers:
# Warning! Static mapping - below - isn't compatible with 
# the parametric router's language logic. 
# You cannot use them together.

- url: /(.+?)/static/_\d.\d.\d\/(.+)
  static_files: applications/\1/static/\2
  upload: applications/(.+?)/static/(.+)
  secure: optional
  expiration: "365d"

#- url: /(.+?)/static/(.+)
#  static_files: applications/\1/static/\2
#  upload: applications/(.+?)/static/(.+)
#  secure: optional

This solved the problem for me. 
I also tried to access an image directly in my views without having a version number in the static/ path and it seems to work. 
Nothing else broke so far.

-Miguel

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lucas Geiger

unread,
Oct 2, 2014, 10:27:39 AM10/2/14
to web...@googlegroups.com

Hi Miguel, sorry which line specifically?
Also did you use the "web2py.py -G config " to generate these?
I did. It seems that would be a bug?

Lucas Geiger

You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/sN8mWOiCqgI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Miguel Goncalves

unread,
Oct 2, 2014, 10:46:41 AM10/2/14
to web2py-users
hi

Yes I did use the web2py.py -G to configure those.

The lines are the ones commented:

#- url: /(.+?)/static/(.+)
#  static_files: applications/\1/static/\2
#  upload: applications/(.+?)/static/(.+)
#  secure: optional

They were not commented out in the original app.yaml 


-M

Lucas Geiger

unread,
Oct 2, 2014, 12:57:33 PM10/2/14
to web...@googlegroups.com
Hi Miguel, this seems to break the rest of app for me, including welcome:
https://www.dropbox.com/s/sa7s3yp5xy47ckb/Screenshot%202014-10-02%2012.55.58.png?dl=0

I didn't notice it until clearing the browser cache.

Can you confirm?
Thanks

On Thu, Oct 2, 2014 at 10:46 AM, Miguel Goncalves

Lucas Geiger

unread,
Oct 2, 2014, 12:58:05 PM10/2/14
to web...@googlegroups.com
Hi Miguel, this seems to break the rest of app for me, including welcome:
https://www.dropbox.com/s/sa7s3yp5xy47ckb/Screenshot%202014-10-02%2012.55.58.png?dl=0

I didn't notice it until clearing the browser cache.

Can you confirm?
Thanks

> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/sN8mWOiCqgI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Miguel Goncalves

unread,
Oct 3, 2014, 8:57:17 AM10/3/14
to web2py-users
Hi

I cleared the cache and also tried running in IE and Chrome.
Everything is still working properly for me.


-Miguel

Lucas Geiger

unread,
Oct 3, 2014, 9:52:35 AM10/3/14
to web...@googlegroups.com
I'm not having luck with that. Can you post your yml file here?

Another question: have you tried using GAE's release pipeline with
Github? It seems the yml is not valid and fails. Wondering if it's
related. See here:
https://groups.google.com/forum/#!topic/web2py-developers/ldksNnV7EeQ

On Fri, Oct 3, 2014 at 8:56 AM, Miguel Goncalves

Miguel Goncalves

unread,
Oct 8, 2014, 9:54:28 AM10/8/14
to web2py-users
Hi

Please find my app.yaml file attached.

I have not tried the "release pipeline with GitHub".

-Miguel
app.yaml

lpg

unread,
Oct 10, 2014, 12:43:35 PM10/10/14
to web...@googlegroups.com
Hi Miguel, I've been talking with Niphlod, w2p maintainer. See here.

Looks like there will be an update to w2p shortly.
Meanwhile you can try what Niphlod developed, I attached here. It works with Release Pipelines as well (Which IMO is a great feature of GAE). 
app.yaml

Miguel Goncalves

unread,
Oct 13, 2014, 6:38:21 PM10/13/14
to web2py-users
Cool, I tried grouping the regex, put back the section I had comented out and it seems to be working.
Thanks

-Miguel
Reply all
Reply to author
Forward
0 new messages