Admin on GAE

68 views
Skip to first unread message

PRACHI VAKHARIA

unread,
Aug 16, 2018, 1:37:32 AM8/16/18
to web2py-users
How to access full web2py Admin in GAE SDK?
  • How to view Error Tickets while doing development in web2py on GAE SDK?
  • How to access the full web2py Admin features on GAE SDK?

Please Advise! I am a beginner in web2py+GAE.
Thank You!

黄祥

unread,
Aug 17, 2018, 9:02:17 AM8/17/18
to web2py-users

  • How to view Error Tickets while doing development in web2py on GAE SDK?
every error tickets usually store in errors folder of it's application folder name, you can check it manually
  • How to access the full web2py Admin features on GAE SDK?
from the book it said:
app.example.yaml (when copied to app.yaml) is configured to deploy the web2py welcome application, but not the admin or example applications.
ref:

best regards,
stifan

PRACHI VAKHARIA

unread,
Aug 17, 2018, 3:42:58 PM8/17/18
to web...@googlegroups.com

  • How to view Error Tickets while doing development in web2py on GAE SDK?
every error tickets usually store in errors folder of it's application folder name, you can check it manually

That is not true for GAE, it appears. There are no files inside the errors folder.
 
  • How to access the full web2py Admin features on GAE SDK?
from the book it said:
app.example.yaml (when copied to app.yaml) is configured to deploy the web2py welcome application, but not the admin or example applications.
ref:

Thank you. But how can one deploy and access the admin on GAE SDK locally?

黄祥

unread,
Aug 17, 2018, 8:56:58 PM8/17/18
to web2py-users
pardon, yes, you r right, ticket not written on errors folder tested with web2py 2.17.1 on mac
step
curl -L -O -C - https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-212.0.0-darwin-x86_64.tar.gz
tar xzvf google
-cloud-sdk-*.tar.gz
curl
-O http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src
.zip
cp web2py
/examples/app.example.yaml web2py/app.yaml
cp web2py
/handlers/gaehandler.py web2py/
python google
-cloud-sdk/bin/dev_appserver.py web2py
open http
://localhost:8000
open http
://localhost:8080
open http
://localhost:8080/admin

error traceback on terminal
ERROR    2018-08-18 00:47:41,273 restricted.py:174] Traceback (most recent call last):
 
File "/Users/sugizo/Downloads/learn/web2py/gluon/restricted.py", line 219, in restricted
   
exec(ccode, environment)
 
File "/Users/sugizo/Downloads/learn/web2py/applications/admin/models/access.py", line 16, in <module>
    session_db
= DAL('gae')
 
File "/Users/sugizo/Downloads/learn/web2py/gluon/packages/dal/pydal/base.py", line 170, in __call__
    obj
= super(MetaDAL, cls).__call__(*args, **kwargs)
 
File "/Users/sugizo/Downloads/learn/web2py/gluon/packages/dal/pydal/base.py", line 454, in __init__
    adapter
= adapters.get_for(self._dbname)
 
File "/Users/sugizo/Downloads/learn/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 20, in get_for
   
'Adapter not found for %s' % uri
SyntaxError: Adapter not found for gae

INFO    
2018-08-18 00:47:41,274 gaehandler.py:75] **** Request: 784.99ms/174.91ms (real time/cpu time)
INFO    
2018-08-18 00:47:41,281 module.py:880] default: "GET /admin HTTP/1.1" 500 707

best regards,
stifan

黄祥

unread,
Aug 18, 2018, 7:17:07 AM8/18/18
to web2py-users
  • How to view Error Tickets while doing development in web2py on GAE SDK?
you can check the error on terminal that run gae dev_appserver.py, assumming you have the same step like i shown before
e.g. error traceback in terminal that run gae dev_appserver.py
ERROR    2018-08-18 11:05:13,150 restricted.py:174] Traceback (most recent call last):

 
File "/Users/sugizo/Downloads/learn/web2py/gluon/restricted.py", line 219, in restricted
   
exec(ccode, environment)

 
File "/Users/sugizo/Downloads/learn/web2py/applications/test/models/db.py", line 20, in <module>
    locale
.setlocale(locale.LC_ALL, 'id_ID') # for mac
 
File "/Users/sugizo/Downloads/learn/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/stubs.py", line 92, in fake_set_locale
   
raise locale.Error('locale emulation only supports "C" locale')
Error: locale emulation only supports "C" locale

INFO    
2018-08-18 11:05:13,151 gaehandler.py:75] **** Request: 856.24ms/490.36ms (real time/cpu time)
INFO    
2018-08-18 11:05:13,259 module.py:880] default: "GET /test HTTP/1.1" 500 707INFO     2018-08-18 11:05:13,931 module.py:880] default: "GET /favicon.ico HTTP/1.1" 404 -

  • How to access the full web2py Admin features on GAE SDK?
think you can have web2py admin features via terminal or file manager or browser for database (datastore), i mean:
- for edit, create or delete file (*.py, *.html) you can do it via terminal or file manager with text editor
- for uninstall you can remove the web2py app under applications folder
- to pack web2py app you can use tar command
- for database access you can access http://localhost:8000 (datastore)

for the web2py admin via web browser, like reported on previous post i found an error too, perhaps others can give a hint
an a few notes pls ensure you run on python 2.7.x, python 3 is not work
$ python google-cloud-sdk/bin/dev_appserver.py web2py
ERROR
: Python 3 and later is not compatible with the Google Cloud SDK. Please use Python version 2.7.x.

If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it
.

best regards,
stifan
Reply all
Reply to author
Forward
0 new messages