Re: [web2py] Re: Unable to display dropdown lists in forms

2018-12-04 Thread Arindam Dasgupta
@ sandeep : your solution works for me but the problem is that I cammot style the elements added later using general css rules like : input[type=submit]{ background-color: #4CAF50; border: none; color: white; padding: 16px 32px; text-decoration: none; margin: 4px 2px;

[web2py] Re: Unable to display dropdown lists in forms

2018-12-04 Thread Dave S
On Tuesday, December 4, 2018 at 4:40:30 AM UTC-8, Arindam Dasgupta wrote: > > Hi, > I need to display a drop down list in my form but have no idea how to do > it. I have the following arrangements : > > Model : > > db.define_table('orders', > > Field('comments'

[web2py] Re: Delete sessions

2018-12-04 Thread Dave S
On Tuesday, December 4, 2018 at 12:17:52 AM UTC-8, Gaël Princivalle wrote: > > Hello. > > Is there a way to delete automatically the sessions? > I mean the folders/files inside this folder: > web2py/applications/my_app/sessions > > For example deleting the sessions oldest than 1 week. > >

[web2py] count field with update_or_insert()

2018-12-04 Thread Dave S
I'm using update_or_insert http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#update_or_insert> for a table that's keeping track of a certain type of request. I'd like to keep track of how many times a particular row has been updated, and I'm wondering if I can do that

[web2py] Re: Delete sessions

2018-12-04 Thread DaneW
I use the sessions2trash.py script very successfully as an hourly task on PythonAnywhere. I copied the code from the web2py scripts folder to a scripts folder under my app as I've modified the original code slightly to print totals of trashed sessions. I use the "delete after 60 minutes"

[web2py] Re: How to solve '\x00' error

2018-12-04 Thread Leonel Câmara
The application should be running with migration disabled in production in which case this won't happen. -- 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) ---

Re: [web2py] Re: 2.17.2 breaking scheduler changes

2018-12-04 Thread Jim Steil
Yes, it should be, but I believe when I ran it the first time I had fake_migrate = True. On Tue, Dec 4, 2018 at 4:51 PM Leonel Câmara wrote: > Humm that should be a simple matter of running it with migrate=True. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book

[web2py] New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-04 Thread Jim S
I'm getting this on every request 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Traceback (most recent call last): File "/home/www-data/web2py/gluon/main.py", line 461, in wsgibase session._try_store_in_db(request, response) File

[web2py] Re: 2.17.2 breaking scheduler changes

2018-12-04 Thread Leonel Câmara
Humm that should be a simple matter of running it with migrate=True. -- 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

[web2py] Re: 2.17.2 breaking scheduler changes

2018-12-04 Thread Jim S
In a recent release, a 'broadcast' field was added to the scheduler_task table. I had to add it manually to get it to work. I added it with type varchar(512) and then it started working again. -Jim On Tuesday, December 4, 2018 at 10:50:07 AM UTC-6, Jason Solack wrote: > > Hello, > > We've

[web2py] Re: db._adapter.is_numerical_type no longer found

2018-12-04 Thread Leonel Câmara
Just make your own is_numerical_type function def is_numerical_type(ftype): return ftype in ('integer','boolean','double','bigint') or ftype. startswith('decimal') And use that one. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Unable to display dropdown lists in forms

2018-12-04 Thread sandeep patel
You can do this way. # Controller.py Add id in your input field. def test(): form = FORM(LABEL("File(s):"), INPUT(_name='pic_upload', _type='file', _multiple=''), BR(), LABEL("Comments:"), INPUT(_name='comments'), BR(), LABEL("Print Size:"),

[web2py] Re: 2.17.2 breaking scheduler changes

2018-12-04 Thread Leonel Câmara
What errors are you getting? Did you restart the scheduler after updating web2py? -- 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

[web2py] db._adapter.is_numerical_type no longer found

2018-12-04 Thread Carl Petersen
Hello, The following line in a view which used to work in web2py 2.6.x no longer works in 2.17.2. I expect it has something to do with moving pydal to it's own package, but I'm not sure how to rectify the issue. {{=db.error_invoice_line[fieldname].label}} The error given is: 1. 2. 3. 4. 5.

Re: [web2py] Unable to display dropdown lists in forms

2018-12-04 Thread Arindam Dasgupta
@ sandeep. Thanks a lot for your solution and it is working for me. But I am facing a small problem : When I choose a option from the drop down list and later change my mind and try to select a different value , I cannot do that because after the first selection, it is not showing other values.Any

[web2py] 2.17.2 breaking scheduler changes

2018-12-04 Thread Jason Solack
Hello, We've recently updated web2py and now our applications utilizing the scheduler are having errors. We can see there are significant changes to scheduler.py - but not sure if it's just a matter of adding fields to the our tables to bring it back up and running. Thanks for any advice!

Re: [web2py] Unable to display dropdown lists in forms

2018-12-04 Thread Ben Duncan
Here is a sample I did when I found some OLD web2py forums. I tested with a dictionary then with a "in" DB .. In controller/default.py: def company_login(): # Read the company file into a dictionary company =

Re: [web2py] Unable to display dropdown lists in forms

2018-12-04 Thread sandeep patel
@Arindam: Try the following code instead def test(): form = FORM(LABEL("File(s):"), INPUT(_name='pic_upload', _type='file', _multiple=''), BR(), LABEL("Comments:"), INPUT(_name='comments'), BR(), LABEL("Print Size:"), INPUT(_name='print_size'),

Re: [web2py] Unable to display dropdown lists in forms

2018-12-04 Thread Lovedie JC
I have done something like that. Let me retrieve it in 3hrs On 4 Dec 2018 5:17 PM, "Ben Duncan" wrote: I was working on trying to figure out the EXACT same thing ! Thanks .. *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Tue,

Re: [web2py] Unable to display dropdown lists in forms

2018-12-04 Thread Ben Duncan
I was working on trying to figure out the EXACT same thing ! Thanks .. *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Tue, Dec 4, 2018 at 6:40 AM Arindam Dasgupta wrote: > Hi, > I need to display a drop down list in my form but

[web2py] Unable to display dropdown lists in forms

2018-12-04 Thread Arindam Dasgupta
Hi, I need to display a drop down list in my form but have no idea how to do it. I have the following arrangements : Model : db.define_table('orders', Field('comments' ,type='string'), Field('print_size',requires=IS_IN_SET(['5x3.5', '6x4', '6x4.5', '5x7',

Re: [web2py] Help needed with web2py-book app

2018-12-04 Thread Ari Lion BR Sp
Congrratulations and Thanks, Nico ari / brazil Em terça-feira, 4 de dezembro de 2018 05:51:53 UTC-3, Nico Zanferrari escreveu: > > Yes, the online version of the book is a web2py application - and I've > made it Python 3 compatible with that PR. > > But indeed the content of the book itself is

Re: [web2py] Help needed with web2py-book app

2018-12-04 Thread Nico Zanferrari
Yes, the online version of the book is a web2py application - and I've made it Python 3 compatible with that PR. But indeed the content of the book itself is still mainly Python2-oriented any help is appreciated ;-) Nico Il giorno Lun 3 Dic 2018, 18:17 Marcelo Huerta ha scritto: > El

[web2py] Re: Delete sessions

2018-12-04 Thread 黄祥
think there is a web2py script for that session2trash.py ref: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Cleaning-up-sessions another alternative you can use shell or python subprocess then make a scheduler for it (cron) or even with configuration management like ansible

[web2py] Delete sessions

2018-12-04 Thread Gaël Princivalle
Hello. Is there a way to delete automatically the sessions? I mean the folders/files inside this folder: web2py/applications/my_app/sessions For example deleting the sessions oldest than 1 week. Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -