[web2py] Re: I broke something

2019-06-18 Thread Константин Комков
Also I see that error: Ticket ID 10.250.10.160.2019-06-18.11-10-10.65f5c525-97e7-4cf4-985b-eea6fd89e420 Версия web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Python Python 3.7.3: C:\Python\python.exe (prefix: C:\Python)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.

[web2py] T() in modules

2019-06-18 Thread 黄祥
web2py™ Version 2.18.5-stable tryin to use T() in modules Traceback (most recent call last): File "/Users/sugizo/learn/python/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/sugizo/learn/python/web2py/applications/test/controllers/api.py", line

Re: [web2py] Re: intercepting login & logout events

2019-06-18 Thread Eliezer (Vlad) Tseytkin
This is perfect, I missed it, Thank you!! On Tue, Jun 18, 2019, 2:25 AM 'Annet' via web2py-users < web2py@googlegroups.com> wrote: > Web2py has auth.settings I used them to solve your problem > > > auth.settings.login_onaccept = lambda form: __on_login() > auth.settings.logout_onlogout = lambda u

[web2py] Re: intercepting login & logout events

2019-06-18 Thread Yoel Benitez Fonseca
missed that one El martes, 18 de junio de 2019, 2:25:18 (UTC-4), Annet escribió: > > Web2py has auth.settings I used them to solve your problem > > > auth.settings.login_onaccept = lambda form: __on_login() > auth.settings.logout_onlogout = lambda user: __on_logout() > > and then in the functions

[web2py] Re: T() in modules

2019-06-18 Thread Anthony
See http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules. You can use current.T. Anthony On Tuesday, June 18, 2019 at 6:39:21 AM UTC-4, 黄祥 wrote: > > web2py™ Version 2.18.5-stable > tryin to use T() in modules > Traceback (most recent call last): > Fil

[web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Anthony
In SQLite, the tilde (~) is a unary operator used for bitwise negation. If used as a prefix for an order by column, SQLite will not throw an error (as it is a valid operator), but nor will sort they way you expect. In Postgres, the tilde is not a unary operator but a regular expression operator

[web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Vlad
Anthony, it works like a charm, thank you very much!! (Val's solution with also worked great, but it felt awkward to use the whole thing when an alias was created, so emotionally this solution with alias feels better :) On a side note, for SQLite orderby=['~shares'] works perfect - it indeed

[web2py] Re: I broke something

2019-06-18 Thread Jim S
Isn't that an old except syntax that is not supported in Python 3? I'm thinking it should be: except Exception as e: ...but, I'm no expert in 2 to 3 changes. Anyone else know more about this? -Jim On Tuesday, June 18, 2019 at 3:11:14 AM UTC-5, Константин Комков wrote: > Also I see that erro

Re: [web2py] Re: I broke something

2019-06-18 Thread Massimiliano
The error seems to be in: session_data = pickle.loads(row['session_data']) try to delete session files or data On Tue, Jun 18, 2019 at 10:11 AM Константин Комков wrote: > Also I see that error: > Ticket ID > > 10.250.10.160.2019-06-18.11-10-10.65f5c525-97e7-4cf4-985b-eea6fd89e420 > Версия > we

[web2py] Re: I broke something

2019-06-18 Thread Константин Комков
Leonel Câmara, told me delete all errors and session files when I change web2py version. As I think that can be useful in my situation. I deleted all errors in all apps and now don't see new errors. I will be wait and check apps errors tomorrow. Thank you, Jim S and Massimiliano. -- Resources:

[web2py] TypeError: object of type 'Field' has no len()

2019-06-18 Thread 黄祥
*controllers/api.py* import table_test def test(): return table_test.test *modules/table_test.py* from gluon.dal import * from gluon.validators import * from gluon import current import field_constructor db = DAL('sqlite://test.sqlite', pool_size = 1) def on_define_test(table): T = curren

[web2py] Re: T() in modules

2019-06-18 Thread 黄祥
> > See > http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules. > > You can use current.T. > forgot about that one, thx Anthony, think the same code can work in web2py n web3py just set the correct imported modules , seems the web2py have a hidden fea

[web2py] sqlform grid to show a field entirely, without cutting off the text

2019-06-18 Thread Vlad
Is there an easy way to force the SQLFORM grid to show one specific column entirely, without cutting it off, even if the row would have to be extended vertically, just whatever it takes to see the full text content? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - h

[web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Anthony
On Tuesday, June 18, 2019 at 11:04:16 AM UTC-4, Vlad wrote: > > Anthony, it works like a charm, thank you very much!! > > (Val's solution with also worked great, but it felt awkward to use the > whole thing when an alias was created, so emotionally this solution with > alias feels better :) > Y

Re: [web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Eliezer (Vlad) Tseytkin
Got it, Thank you very much On Tue, Jun 18, 2019, 1:53 PM Anthony wrote: > On Tuesday, June 18, 2019 at 11:04:16 AM UTC-4, Vlad wrote: >> >> Anthony, it works like a charm, thank you very much!! >> >> (Val's solution with also worked great, but it felt awkward to use the >> whole thing when an a

[web2py] Re: sqlform grid to show a field entirely, without cutting off the text

2019-06-18 Thread 'Annet' via web2py-users
I think Anthony answered this question in this post: https://groups.google.com/forum/?fromgroups=#!topic/web2py/okMVqyQPKV8 hope he did ;-) Regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://cod

[web2py] Re: sqlform grid to show a field entirely, without cutting off the text

2019-06-18 Thread Vlad
works like a charm!! thank you Annet!!! thank you Anthony!!! On Tuesday, June 18, 2019 at 3:11:08 PM UTC-4, Annet wrote: > > I think Anthony answered this question in this post: > > https://groups.google.com/forum/?fromgroups=#!topic/web2py/okMVqyQPKV8 > > hope he did ;-) > > > Regards, > > Ann

[web2py] Re: Foreign key error after adding new table instance

2019-06-18 Thread Steve
OK, After searching the sqlite db and the views problem solved. DB inegrity was ok ... the view was wrong Op zondag 16 juni 2019 17:53:33 UTC+2 schreef Steve: > > Hi All, > > Busy with my platform, just added some tables. > I have defined extra fields for the Auth table. > > In 1 of the