Re: [web2py] web2py, nginx and big files

2018-04-18 Thread Carlos Cesar Caballero Díaz
El 18/04/18 a las 13:54, Richard Vézina escribió: That big... Hope it could work for you... Well, right now is working with your suggestion, but not perfect, is really slow because nginx uploads the file to a tmp file, next seems to copy the file to another place (I assume to uwsgi) and

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread Anthony
On Wednesday, April 18, 2018 at 6:21:12 PM UTC-4, dirman wrote: > > Working after adding compute=lambda > > Field('link', compute=lambda r: r.article_link.replace(' ', '-')) > Sorry, forgot the "compute=". I've updated my original response. > However the table fields can not be updated using

[web2py] Re: appconfig local vs api provide by another web2py app

2018-04-18 Thread Anthony
> > good point, thanks anthony, like i expect before about http request. > from your example it's base on json, is it same or different with *.ini > file like the web2py scaffolding welcome app, i mean in terms of speed or > performance ? > reason why plan to use json, because want to store

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
Working after adding compute=lambda Field('link', compute=lambda r: r.article_link.replace(' ', '-')) However the table fields can not be updated using grid On Wednesday, April 18, 2018 at 6:12:40 PM UTC, Anthony wrote: > > On Wednesday, April 18, 2018 at 10:57:11 AM UTC-4, dirman wrote: >> >>

[web2py] Re: appconfig local vs api provide by another web2py app

2018-04-18 Thread 黄祥
On Wednesday, April 18, 2018 at 9:12:22 PM UTC+7, Anthony wrote: > > Why not: > > myconf = AppConfig(configFile=os.path.join(request.folder, '..', > 'appconfig', 'private', 'app0.json')) > > Making an HTTP request will add some overhead, though it shouldn't matter > as long as you leave the

[web2py] Re: Exception while handling exception at gluon/streamer.py (python 3)

2018-04-18 Thread Antonio Salazar
The bug is very easy to reproduce: - Clone the repository from GitHub - Run python3 web2py.py - Browse to http://127.0.0.1:8000/welcome/favicon.ico It seems only *base/streamer.py* and *contrib/gateways/fcgi.py* handle exceptions in this way. On Wednesday, April 18, 2018 at 12:00:43

[web2py] Re: problem export virtual field to CSV using grid

2018-04-18 Thread Marcelo Huerta
I have also found the same problem. -- 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

Re: [web2py] Nginx + SSL certificates for two different apps

2018-04-18 Thread Richard Vézina
Here how I achieved it with openssl : openssl req -new -days 730 -sha256 -key NAME.key -subj "/.../CN=*. DOMAIN.COM/emailAddress=yourem...@domain.com" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:sub1.DOMAIN.COM

[web2py] Login not working on smartphone - no the same menu layout

2018-04-18 Thread Andrea Fae'
this is my application https://andfae.pythonanywhere.com/tcf/default/index I can't login with android. I don't know. I see in the upper right of the smartphone 3 lines but when I click nothing happens...How to fix it? Thank you -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread Anthony
On Wednesday, April 18, 2018 at 10:57:11 AM UTC-4, dirman wrote: > > http://.../articles/high-temperature-in-city > > def articles(): > news = db(db.articles.article_link==request.args[0]).select()[0] > return(news=news) > I see. Yes, if you need to use the values to make a database

[web2py] Dynamic url routing

2018-04-18 Thread kamala kotha
routes_in = ( ('/(?P[\w]+)(?P.*)', '/myapp\g?client=\g'), ) user will have to see the same url they had entered. so how should i have the routes_out so that outgoing url is same as incoming url. Is there a way to access the dynamic prefix entered by user in the

Re: [web2py] Nginx + SSL certificates for two different apps

2018-04-18 Thread Richard Vézina
You have to use multiple subdomain certificate... Look at SNI certificate configuration... I will have a look at how I achieve that. On Wed, Apr 18, 2018 at 6:16 AM, dirman wrote: > I need help setting two SSL certificates for two different apps on one > instance of web2py.

Re: [web2py] web2py, nginx and big files

2018-04-18 Thread Richard Vézina
That big... Hope it could work for you... Are you trying to make El packet transiting the island faster or what... :D Richard On Wed, Apr 18, 2018 at 1:45 PM, Carlos Cesar Caballero Díaz < carlos.caball...@cfg.jovenclub.cu> wrote: > Thanks Richard, It seems to be working now. The files can be

Re: [web2py] web2py, nginx and big files

2018-04-18 Thread Carlos Cesar Caballero Díaz
Thanks Richard, It seems to be working now. The files can be several Gigabytes. Greetings. El 17/04/18 a las 13:10, Richard Vézina escribió: How big? https://www.bookstackapp.com/docs/admin/upload-limits/ https://www.nginx.com/resources/wiki/modules/upload/#upload-max-file-size Quote

[web2py] Exception while handling exception at gluon/streamer.py (python 3)

2018-04-18 Thread Antonio Salazar
Now that web2py supports python 3, I just went on and migrated my website. All works fine, except for a crash which I'm not sure how to handle. I get this when the browser looks for /favicon.ico (a non-existent file because it's in /images/favicon.ico) Traceback (most recent call last): File

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
http://.../articles/high-temperature-in-city def articles(): news = db(db.articles.article_link==request.args[0]).select()[0] return(news=news) On Wednesday, April 18, 2018 at 2:28:41 PM UTC, Anthony wrote: > > On Wednesday, April 18, 2018 at 10:24:21 AM UTC-4, dirman wrote: >> >>

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread Anthony
On Wednesday, April 18, 2018 at 10:24:21 AM UTC-4, dirman wrote: > > I tried virtual field but can not use it as request args to select the > records > Not sure what you mean by that. What does request args have to do with it? Can you show your code? > They do not appear in the list table

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
Any example?. what i want to do is to use article_link as request args to select the records instead of record.id On Wednesday, April 18, 2018 at 11:16:35 AM UTC, 黄祥 wrote: > > perhaps you can use before_insert callback or onvalidate, then assign > article_link with the article_title that

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
I tried virtual field but can not use it as request args to select the records They do not appear in the list table fields. I got a ticket using the computed field example Field('article_link', lambda r: r.article_title.replace(' ', '-')) or also Field('article_link', lambda r:

[web2py] Re: appconfig local vs api provide by another web2py app

2018-04-18 Thread Anthony
Why not: myconf = AppConfig(configFile=os.path.join(request.folder, '..', 'appconfig' , 'private', 'app0.json')) Making an HTTP request will add some overhead, though it shouldn't matter as long as you leave the default reload=False -- that way, it will only load the config data from the

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread Anthony
You probably want a computed field . Field('article_link', lambda r: r.article_title.replace(' ', '-')) Alternatively, to avoid storing redundant data in the database, you can instead use a virtual

[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread 黄祥
perhaps you can use before_insert callback or onvalidate, then assign article_link with the article_title that already converted with function .replace('', '-') best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
How can i automatically repeat a field text into another field with hyphens to replace spaces before record insertion I want to insert 'High Temperature In City' in the article_title and to be repeated in the article_link with hyphens db.define_table('articles', Field('article_title',

[web2py] Nginx + SSL certificates for two different apps

2018-04-18 Thread dirman
I need help setting two SSL certificates for two different apps on one instance of web2py. kindly include the config file if you can help me. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Simple math in form

2018-04-18 Thread Alby Cartner
I have been searching and reading and experimenting for 3 days now. This is driving me crazy and I know I am missing something fundamental as I am a noob. I want to have the user input several integers, add them up and put them in a total field on the form before the submit to the database.