[web2py] Re: decremental subtraction of values in DB field

2019-01-15 Thread mostwanted
This is my model code, its basically what you did: I am getting this error * invalid table "fuelLogging" attributes: set(['before_update'])* *MODEL CODE* def fuelLogging_before_update(*args, **kwargs): db.fuelLogging.compute = lambda r: (db.fuelLogging.ODO_Reading * -1) + r .ODO_Reading

[web2py] Re: default combobox for a db field in a form (SQLFORM) - question

2019-01-15 Thread Dave S
On Tuesday, January 15, 2019 at 5:23:37 PM UTC-8, Vlad wrote: > > when I use SQLFORM to create a form where one of the fields is, for > example, a user (db.auth_user) w2p gives me a nice combo-box to select a > user. > this is good, but only if there are few items. > if there are thousands,

[web2py] default combobox for a db field in a form (SQLFORM) - question

2019-01-15 Thread Vlad
when I use SQLFORM to create a form where one of the fields is, for example, a user (db.auth_user) w2p gives me a nice combo-box to select a user. this is good, but only if there are few items. if there are thousands, the combo-box becomes awkward. does webpy have some convenient alternative

Re: [web2py] Re: How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Eliezer (Vlad) Tseytkin
I got it, Thank you very much On Tue, Jan 15, 2019, 4:29 PM Dave S > > On Tuesday, January 15, 2019 at 9:38:34 AM UTC-8, Vlad wrote: >> >> Dave, >> I am probably missing something, but it seems to me that those are 2 >> different pages. 404 is just 404, while not authorized is another page >>

[web2py] Re: Different layout.html

2019-01-15 Thread Dave S
On Tuesday, January 15, 2019 at 9:12:52 AM UTC-8, Dave S wrote: > > > > On Tuesday, January 15, 2019 at 4:56:18 AM UTC-8, perakoj...@gmail.com > wrote: >> >> You can take any bootstrap html template and use it as layout. You just >> need to modify it a bit. >> Here's one >>

[web2py] Re: Scheduler tasks fail intermitently with no apparent reason (sys.exit(1))

2019-01-15 Thread Dave S
On Tuesday, January 15, 2019 at 10:34:53 AM UTC-8, Leonel Câmara wrote: > > *Lisandro *that problem is appearing when trying to create an environment > to execute the task, where it imports the models from the application. Is > it possible the folder of the application has been removed or

[web2py] Re: How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Dave S
On Tuesday, January 15, 2019 at 9:38:34 AM UTC-8, Vlad wrote: > > Dave, > I am probably missing something, but it seems to me that those are 2 > different pages. 404 is just 404, while not authorized is another page > displaying the text about insufficient privileges - and really it should be

Re: [web2py] Re: web2py apps & github

2019-01-15 Thread Dave S
On Sunday, January 13, 2019 at 6:33:14 AM UTC-8, Vlad wrote: > > Got it, > thank you very much. > Learning git now - it's so messy and unstructured as far as learning curve > :) I guess once I get it, it becomes quick and easy... > > In my opinion, git is ugly, but then I went from rcs to

[web2py] $50 take a bootstrap and create a web2py app. Anyone interested?

2019-01-15 Thread Ron Chatterjee
I haven't used the app for long time. To get going fast, looking for someone to create a template using bootstrap. Method to be followed: http://www.web2pyslices.com/slice/show/1516/adapt-a-css-template-to-web2py-layouthtml I will need one table that calls on a for loop to upload pics and

[web2py] Re: Scheduler tasks fail intermitently with no apparent reason (sys.exit(1))

2019-01-15 Thread Lisandro
Thank you Leonel, that could be the reason, or at least could be related. The "models" folder in those cases wasn't removed or anything like that, but still I should mention a couple of things about my scenario: * I have several web2py apps installed, serving multiple websites; each website has

[web2py] Re: [PyDAL] AttributeError '_thread._local' object has no attribute '_pydal_connection_somerandomnumber'

2019-01-15 Thread Leonel Câmara
Not really a web2py question but you probably need to monkeypatch the threading library before anything else in your process: import eventlet eventlet.monkey_patch() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Scheduler tasks fail intermitently with no apparent reason (sys.exit(1))

2019-01-15 Thread Leonel Câmara
*Lisandro *that problem is appearing when trying to create an environment to execute the task, where it imports the models from the application. Is it possible the folder of the application has been removed or moved before the scheduler task is run? This would explain why it doesn't happen

Re: [web2py] Re: How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Eliezer (Vlad) Tseytkin
This is perfect, Thank you very much! On Tue, Jan 15, 2019, 1:28 PM Leonel Câmara Vlad check: > > http://www.web2pyslices.com/slice/show/1529/custom-error-routing > > It explains exactly what you want to do. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Re: How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Leonel Câmara
Vlad check: http://www.web2pyslices.com/slice/show/1529/custom-error-routing It explains exactly what you want to do. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Vlad
Dave, I am probably missing something, but it seems to me that those are 2 different pages. 404 is just 404, while not authorized is another page displaying the text about insufficient privileges - and really it should be different. It's not that a resource is not found - it's just that a user

[web2py] Re: Different layout.html

2019-01-15 Thread Dave S
On Tuesday, January 15, 2019 at 4:56:18 AM UTC-8, perakoj...@gmail.com wrote: > > You can take any bootstrap html template and use it as layout. You just > need to modify it a bit. > Here's one > > > template

[web2py] Re: How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Dave S
On Tuesday, January 15, 2019 at 8:16:18 AM UTC-8, Vlad wrote: > > Not AuthorizedInsufficient privileges > This appears to already be customized! In the default out-of-the-box welcome app, file:///[..]web2py/applications/MusicBDs/static/404.html is just a very simple 3=4 characters: '404\n'.

[web2py] Re: Scheduler tasks fail intermitently with no apparent reason (sys.exit(1))

2019-01-15 Thread Dave S
On Monday, January 14, 2019 at 4:04:08 AM UTC-8, Lisandro wrote: > > I've seeing this for a while now, but I can't figure out why it happens. > > I have several tasks (around 150) that run once per day (at different > hours, maybe some of them run simultaneously). > They always run

[web2py] How can I customize "Not Authorized" page, the one that comes up on @requires_membership decorator?

2019-01-15 Thread Vlad
Not AuthorizedInsufficient privileges -- 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

[web2py] How to preserve line breaks in text field

2019-01-15 Thread Alex Glaros
When converting to PDF, line breaks from a text field are collapsed. How to retain the line breaks? Here is the PDF-creating code text = (r.client_controlled_documentation_stakeholder_content_narrative_description) story.append(Paragraph(escape(text), styles["Normal"]))

[web2py] Re: Scheduler tasks fail intermitently with no apparent reason (sys.exit(1))

2019-01-15 Thread Lisandro
That was my first guess, but the task status in those cases was FAILED, not TIMEOUT. I forgot to mention I'm using web2py version 2.16.1-stable+timestamp.2017.11.14.05.54.25 I'll keep monitoring and see if I can add any detail. Thanks! El martes, 15 de enero de 2019, 5:24:56 (UTC-3), Niphlod

Re: [web2py] Re: Different layout.html

2019-01-15 Thread Ben Duncan
Here is one I am developing for the Supreme Court: We are using flx boxes are the basis for things. See: https://internetingishard.com/html-and-css/flexbox/ !DOCTYPE html> Bens Web Page MEC {{if session.isloggedin == 'Y' :}}

[web2py] Re: Error when sending email from my custom web app [Errno 111] Connection refuse

2019-01-15 Thread Leonel Câmara
Depending on the settings of your server you may also need to set: mail.settings.hostname = 'yourdomain.com' Putting your domain there. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Different layout.html

2019-01-15 Thread perakojotgenije
You can take any bootstrap html template and use it as layout. You just need to modify it a bit. Here's one template that I implemented into this webpage . And here's another web template

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

2019-01-15 Thread Leonel Câmara
Jonsubs yes it could if for some reason web2py wasn't graciously stopped which can happen depending on the OS and if web2py is taking too long to shutdown. Again don't leave migrations enabled otherwise the pickle files will be being written which if stopped halfway can lead to corrupted pickle

[web2py] Scheduler tasks fail intermitently with no apparent reason (sys.exit(1))

2019-01-15 Thread Niphlod
Timeout?! -- 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-users"