[web2py] Re: form grid Order by a Field Value in the Parent Table

2017-09-17 Thread rafi farchi
On Tuesday, September 12, 2017 at 12:12:53 PM UTC+3, tim.n...@conted.ox.ac.uk wrote: > > Your grid should be using a query that brings in both tables, rather than > just the Voyages table: > def Voyages(): > Voyages = SQLFORM.grid(db.EQ_Voyages.Vessel == db.EQ_Vessels.id, > fields=[db.EQ_V

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-17 Thread Anthony
First, you can just put all the router code in /web2py/routes.py -- no need for anything specific in the app folder. Second, you need to specify the functions in the default controller if you want /default/index to be gone when there are any request.args. How are your URLs being generated? What

[web2py] Re: the way to return json

2017-09-17 Thread Anthony
gluon.contrib.simplejson is not really simplejson but just a dummy module that calls the Python json module, so no difference between the first and second. I suspect response.json will be similar to json.dumps. response.json is gluon.serializers.json, which ultimately calls json.dumps, but it p

[web2py] Re: request.requires_https() while using taskqueue.add() in GAE possible?

2017-09-17 Thread Anthony
You can conditionally set request.requires_https() depending on whether the request comes from a GAE Task Queue. Apparently, Task Queue requests will include HTTP headers as noted here: https://stackoverflow.com/a/14838696. So, you can do something like: if 'HTTP_X_APPENGINE_TASKNAME' not in re

[web2py] the way to return json

2017-09-17 Thread 黄祥
just testing several code that return json *e.g.* *controllers/api.py* def json_rows_as_list(): import json query = (db.auth_user.id > 0) rows = db(query).select() json_list = json.dumps(rows.as_list(), default = str, sort_keys = True) return dict(results = XML(json_list) ) """ curl -X GET --user

Re: [web2py] Re: Future of web2py

2017-09-17 Thread Dave S
On Sunday, September 17, 2017 at 9:12:52 AM UTC-7, Marlysson Silva wrote: > > Then will be there are other framework? And no just to port the web2py > codebase to py3.. > Much of the core will be shared, but the presentation will be simpler. FORM() for everything, as SQLRORM() is getting too

[web2py] request.requires_https() while using taskqueue.add() in GAE possible?

2017-09-17 Thread Robert Porter
If I use Google's taskqueue.add(), it keeps giving me a 303 error over and over in the logs because it tries to use the HTTP version of the page the POST is sent to, but I have request.requires_https() in my db.py. I can't find a way for taskqueue to attempt an HTTPS connection. Removing reque

Re: [web2py] Re: Future of web2py

2017-09-17 Thread Marlysson Silva
Then will be there are other framework? And no just to port the web2py codebase to py3.. Em quinta-feira, 14 de setembro de 2017 15:18:58 UTC-3, Dave S escreveu: > > > > On Thursday, September 14, 2017 at 8:02:00 AM UTC-7, Muhammad Hashim Malik > wrote: >> >> Hello folks >> >> Is there any updat

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-17 Thread Joe
Yes, I reloaded the app. Nothing happens, it doesn't change the URL. I tried several different ways to change the routes.py. In the current situation in the *web2py* folder I have this in the* routes.py* file: routers = dict( BASE = dict(default_application='init'), ) Then, in the *web2py/

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-17 Thread Anthony
Did you reload routes or restart the server? -- 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 G