[web2py] Re: app slow on pythonanywhere

2017-07-18 Thread Bernardo Leon
Thank you for your answer, Indeed I am using several ajax requests and I am not able to use session.forget(response) on my components since I need the session information. I have installed redis to test but now I am facing another problem that I have detailed here:

[web2py] Can't log into the application if using redis for sessions

2017-07-18 Thread Bernardo Leon
Hi, I want to use redis to handle my app sessions. I am using the next code in my model: from gluon.tools import Auth from gluon.contrib.redis_utils import RConn from gluon.contrib.redis_session import RedisSession gth_dev_db_connection_string = 'postgres://dev_db:dev_db@[ip]/dev_db' db =

[web2py] Re: web2py 2.15.0b1

2017-07-18 Thread villas
Hi Leonel Thanks for your suggestion and I created an issue on pyDal. The quoting tends to work ok with DBs which default to lowercase, unfortunately Firebird is uppercase. As you say, it would probably be better not to use quotes at all because

Re: [web2py] autobuild'ing web2py models from MySQL metadata?

2017-07-18 Thread Jurgis Pralgauskis
Thanks for the link! :) On Tue, Jul 18, 2017 at 2:23 PM, Anthony wrote: > Have you tried this: https://github.com/web2py/web2py/blob/master/scripts/ > extract_mysql_models.py > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Re: how to calculate time difference in hours, between two dates?

2017-07-18 Thread Alex Glaros
worked Dave! Thanks. nullBottle = db(db.InternalMessage.bottleneck_resolve_date == None).select() for r in nullBottle: db(db.InternalMessage.id == r.id).update(bottleneck_delay_time = (request.now - r.created_on).seconds/3660) -- Resources: - http://web2py.com -

[web2py] Re: how to calculate time difference in hours, between two dates?

2017-07-18 Thread Dave S
On Tuesday, July 18, 2017 at 11:33:33 AM UTC-7, Alex Glaros wrote: > > Goal is to compute bottleneck_delay_time in hours by subtracting > request.now from created_on date. > > What is correct syntaxt? > > Below is wrong but shows intent. > > MODEL > > db.define_table('InternalMessage', >

[web2py] Re: color picker

2017-07-18 Thread Leonel Câmara
You can use a polyfill such as this one https://briangrinstead.com/blog/input-type-color-polyfill/ I wouldn't support IE11 though, that thing needs to die. Still worth it in this case for the shitty ios safari support. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] color picker

2017-07-18 Thread Andrea Fae'
Hello, how to implement a field color picker like Field('colore', 'string', widget=lambda f,v: SQLFORM.widgets.string.widget(f,v, _value=v, _type='color',_data_text='hidden', _hex='true')), This above is working in Chrome and Firefox but not in IE 11... -- Resources: - http://web2py.com -

[web2py] how to calculate time difference in hours, between two dates?

2017-07-18 Thread Alex Glaros
Goal is to compute bottleneck_delay_time in hours by subtracting request.now from created_on date. What is correct syntaxt? Below is wrong but shows intent. MODEL db.define_table('InternalMessage', Field('bottleneck_resolve_date', 'datetime', default = None),

[web2py] Re: wrong home page presented

2017-07-18 Thread mostwanted
i dont understand how that could be possible but i'll look into it On Tuesday, July 18, 2017 at 6:15:10 PM UTC+2, Leonel Câmara wrote: > > It seems to me that you have 2 web2py applications in your pythonanywhere. > One that you defined as the default application, and the init application >

[web2py] Re: web2py 2.15.0b1

2017-07-18 Thread Leonel Câmara
Villas can you submit an issue to pydal. Seems like a bug if we were not using quotes before we probably should not be using them at all. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: web2py 2.15.0b1

2017-07-18 Thread villas
*Re: Firebird* I just tested this version of web2py and I noticed a problem. See the new authapi.py, line 452: rows = self.db(self.table_group().role == role).select() The* new code* produces this SQL: SELECT "auth_group"."id", "auth_group"."role", "auth_group"."description" FROM

[web2py] Re: wrong home page presented

2017-07-18 Thread Leonel Câmara
It seems to me that you have 2 web2py applications in your pythonanywhere. One that you defined as the default application, and the init application which pythonanywhere adds for you. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: remove "login" from navbar

2017-07-18 Thread JoeCodeswell
Hi Folks, I didn't know where to put the above. Here's what worked for me in web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 In layout.html, I commented out the following as shown below: I am posting this so i remember how to do it. :) Love and peace, Joe On Friday,

Re: [web2py] Re: FOREIGN KEY constraint failed

2017-07-18 Thread Santiago Cartasegna
Glad that my idea helped! 2017-07-18 6:20 GMT-03:00 mostwanted : > I was able o solve the problem, when i was creating the tables i copied > and pasted a code for the '*governmetFormPages' *table but to correct the > error i had to delete the table and type its code word

[web2py] Re: wrong home page presented

2017-07-18 Thread mostwanted
I change the app name to *sesoa *so the URLs are : *http://sesoa.pythonanywhere.comhttp://sesoa.pythonanywhere.com/init/default/index * On Tuesday, July 18, 2017

[web2py] Re: wrong home page presented

2017-07-18 Thread mostwanted
Not really, http://sesowa.pythonanywhere.com/ gives a page with the logo in the top left corner and a search text field in the top right corner but this URL http://sesowa.pythonanywhere.com/init/default/index

[web2py] Re: wrong home page presented

2017-07-18 Thread mostwanted
Yes i did On Tuesday, July 18, 2017 at 1:51:06 PM UTC+2, Marlysson Silva wrote: > > Do you clicked in "Reload webapp" in web tab view? > > Em terça-feira, 18 de julho de 2017 06:34:15 UTC-3, mostwanted escreveu: >> >> Guys i need help, i dont know what i'm doing wrong or if there is >>

[web2py] Re: Modules not reloading

2017-07-18 Thread António Ramos
And if i change one of the functions i get the same "refresh" problem... 2017-07-18 14:58 GMT+01:00 António Ramos : > Hello in my db.py > > i have this > > from gluon.custom_import import track_changes; track_changes(True) > > from wf_validates import Validate >

[web2py] Re: After update can't connect Oracle

2017-07-18 Thread Вячеслав Анатольевич
But now i have another error: File ".bububu.web2py\gluon\packages\dal\pydal\adapters\oracle.py", line 71, in create_sequence_and_triggers 'MINVALUE -1;' % sequence_name) TypeError: not all arguments converted during string formatting -- Resources: - http://web2py.com -

[web2py] Re: After update can't connect Oracle

2017-07-18 Thread Вячеслав Анатольевич
Grandiose mersi! -- 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] Modules not reloading

2017-07-18 Thread António Ramos
Hello in my db.py i have this from gluon.custom_import import track_changes; track_changes(True) from wf_validates import Validate db.define_table( "status", ... Field.Virtual('isavailable', lambda row: Validate().Status(row,db)), Format="%(title)s" ) *my wf_validates.py* from html import *

[web2py] Re: After update can't connect Oracle

2017-07-18 Thread Leonel Câmara
This is fixed in this pull request on the DAL https://github.com/web2py/pydal/pull/471 We should merge it and include it in the next release. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] After update can't connect Oracle

2017-07-18 Thread Вячеслав Анатольевич
HI! Can anyone explain why after updating web2py to version 2.15.1 I started to get errors when connecting to Oracle? For example, this: AttributeError: 'Oracle' object has no attribute 'oracle_fix' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: wrong home page presented

2017-07-18 Thread Leonel Câmara
These 2 give exactly the same result to me: http://sesowa.pythonanywhere.com/ http://sesowa.pythonanywhere.com/init/default/index Which is expected as the init app is the default in pythonanywhere standard configuration. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: wrong home page presented

2017-07-18 Thread Marlysson Silva
Do you clicked in "Reload webapp" in web tab view? Em terça-feira, 18 de julho de 2017 06:34:15 UTC-3, mostwanted escreveu: > > Guys i need help, i dont know what i'm doing wrong or if there is > something wrong with my code, i hosted my application with > pythonanywhere.com but when i go to

[web2py] autobuild'ing web2py models from MySQL metadata?

2017-07-18 Thread Anthony
Have you tried this: https://github.com/web2py/web2py/blob/master/scripts/extract_mysql_models.py -- 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

[web2py] wrong home page presented

2017-07-18 Thread mostwanted
Guys i need help, i dont know what i'm doing wrong or if there is something wrong with my code, i hosted my application with pythonanywhere.com but when i go to the url *sesowa.pythonanywhere.com* i get the wrong home page where as it is this address

[web2py] Re: FOREIGN KEY constraint failed

2017-07-18 Thread mostwanted
I was able o solve the problem, when i was creating the tables i copied and pasted a code for the '*governmetFormPages' *table but to correct the error i had to delete the table and type its code word for word, that solved my problem. thanks for the input guys. Santiago Cartasegna was right.

[web2py] Re: autobuild'ing web2py models from MySQL metadata?

2017-07-18 Thread Jurgis Pralgauskis
I found, sqlalhemy has reflection/"autoload" feature per table. and sqlsoup seems even better -- it analyses all tables at once - and can generate code (for sqlalchemy).