[web2py] Re: Issue with query with join and id in select field list

2017-10-12 Thread Ricardo Oliveira
Hi Anthony, Thanks for your reply. That was also my initial solution. Problem is I need to use render() in order to force the lambdas of the table fields to be executed, and I can't seem to find a way to combine render() and as_dict(), that's why I used the approach of iterating through the Row

[web2py] OFF Topic - Learn and update your python skills

2017-10-12 Thread António Ramos
Worked for me... This guy is very good... https://dbader.org/ -- 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 s

Re: [web2py] Re: MySql encryption using DAL

2017-10-12 Thread Chinh Dang
Depending on the type of cloud service you may be able to setup VPN over internet and connect your DB via the VPN tunnel. On Oct 11, 2017 11:24 PM, wrote: On Wednesday, October 11, 2017 at 11:52:02 AM UTC-5, Massimo Di Pierro wrote: > > > On Saturday, 7 October 2017 01:55:53 UTC-5, appj...@gm

[web2py] Re: Why web2py server hangs/freeze?

2017-10-12 Thread Narendra Kumar
Hi, I try to create setup web2py-nginx, using script *setup-web2py-nginx-uwsgi-on-centos.sh* exists in web2py /script folder. During setup Error occur and need to stop setup, Below are the few line of error: --

[web2py] Re: Issue with query with join and id in select field list

2017-10-12 Thread Anthony
You can call .as_dict() on a row object inside an iteration through .render(). Here is a one-liner to replace all your code: json.dumps(dict(data=[{k: v for sub_row in row.as_dict().values() for (k, v) in sub_row.iteritems()} for row in persons.render()])) The list compreh

[web2py] Re: Web2py mobile app using Kivy

2017-10-12 Thread Leonel Câmara
I haven't done mobile in a while. But yes I've done several using cordova/phonegap quite easily. There's no reason why kivy or others like flutter won't work well since this is all about calling webservices that are standard and work with any programming language or framework. The advantage of

[web2py] Re: Issue with query with join and id in select field list

2017-10-12 Thread Ricardo Oliveira
Hi Anthony, Thanks for your excellent example and explanation. You're right about the problem with the field names, luckily the problem occurs only in this example, not in production code, but just out of curiosity, would using "with_alias()" help? Thanks again for all your help. It made a huge

[web2py] select_or_add_widget - can't get recipes, tutorials and example app to work

2017-10-12 Thread 'Matthew J Watts' via web2py-users
Hi there, does anyone know how to get this working with the latest version of web2py - i can't get it working, not even in the sample app below https://github.com/mdipierro/web2py-recipes-source/blob/master/apps/05_adding_ajax_effects/web2py.app.select_or_add_widget.w2p thanks Matt -- Resourc

Re: [web2py] Re: MySql encryption using DAL

2017-10-12 Thread appjarbiz
I'm using Heroku. Would the VPN option be more stable/reliable/performant than an SSH tunnel? On Thursday, October 12, 2017 at 8:07:36 AM UTC-5, CDA wrote: > > Depending on the type of cloud service you may be able to setup VPN over > internet and connect your DB via the VPN tunnel. > > On Oct 1

[web2py] Re: Issue with query with join and id in select field list

2017-10-12 Thread Anthony
On Thursday, October 12, 2017 at 12:45:05 PM UTC-4, Ricardo Oliveira wrote: > > Hi Anthony, > > Thanks for your excellent example and explanation. > You're right about the problem with the field names, luckily the problem > occurs only in this example, not in production code, but just out of > cu

[web2py] Re: How can I run multiple applications with multiple domains on nginx?

2017-10-12 Thread pbreit
Is this the best way to set up multiple domains on one server with Nginx or better to set up nginx "sites-available" etc configs? On Saturday, March 23, 2013 at 3:01:38 AM UTC-7, peter wrote: > > Sorry about replying late Tito. I struggled with your problem for quite a > while, and here is a so

[web2py] Re: directory structure of uploaded file

2017-10-12 Thread Rudy
Hi Antony, Thanks so much again for sharing your insights. I have been playing with uploadfolder, your suggestion below and from another thread (uploadfolder=os.path.join(request.folder, 'uploads', str(auth.user.id) if auth.user else '') work. However what I really want to do is to separate th

[web2py] Re: directory structure of uploaded file

2017-10-12 Thread Anthony
Instead of having SQLFORM automatically insert the new record, you can create custom logic to first insert everything but the file, and then after getting the new record ID, use that to set the uploadfolder and update the record with the file. Anthony On Thursday, October 12, 2017 at 8:26:16 P

[web2py] How to create specific migrations files per sqlite database in same app

2017-10-12 Thread AlighaThor
Hi everyone. I'm experimenting with an multi-tenant app. My goal is to use a sqlite file per tenant (the tenant data). I have a main sqlite file where I have defined the auth tables and a Client (tenant) table. The structure I'm looking for is something like this, where inside a tenant folder t

[web2py] Cant access Google Cloud SQL on GAE application

2017-10-12 Thread Bernardo Leon
Hello, me again. I am testing Google Cloud Platform along with pycharm (I added a new run configuration for gae inside pycharm) and I have the following model: # -*- coding: utf-8 -*- from gluon.tools import Auth db = DAL('google:sql://trahello:trahello-db/trahello') I have installed the googl