Re: [web2py] Re: Conditional Fields & Validators

2020-12-06 Thread James O' Driscoll
Friday, December 4, 2020 at 11:26:40 PM UTC+10 James O' Driscoll wrote: > Hey mate, > > I got around that specific validator, however the is_in_set validator > causes the problem. (It’s needed to create the select field in HTML) > > I managed to get around it with

Re: [web2py] Re: Conditional Fields & Validators

2020-12-04 Thread James O' Driscoll
needed on the model to create the correct input but >> inturn fails the processing of the form as onvalidation doesnot get called. >> >> Any help would be great. >> >> Regards, >> James >> >> >> On Wednesday, December 2, 2020 at 12:35:15 PM UTC+10 Jam

[web2py] Re: Conditional Fields & Validators

2020-12-02 Thread James O' Driscoll
. IS_IN_SET as this is needed on the model to create the correct input but inturn fails the processing of the form as onvalidation doesnot get called. Any help would be great. Regards, James On Wednesday, December 2, 2020 at 12:35:15 PM UTC+10 James O' Driscoll wrote: > Hello all, >

[web2py] Conditional Fields & Validators

2020-12-01 Thread James O' Driscoll
Hello all, I have a question regarding conditional fields and using validators. Take the example from the book with a slight change: db.define_table('purchase', Field('have_coupon', 'boolean'), Field('coupon_code', requires=IS_NOT_EMPTY())) with controller: def index(): db.purchase.coupo

[web2py] Re: Static files based on authorisation

2020-06-03 Thread James O' Driscoll
Would you have any sample code for your potential solutions? I was thinking about using another controller for the bundle. But how would you do this in practice ie sample code. Additionally I will be implementing code splitting very soon where my bundle will be split into 3-4 smaller bundles.

[web2py] Static files based on authorisation

2020-06-03 Thread James O' Driscoll
I am using webpack to create bundles for my app, controller/function renders a view that’s has a script tag with a src to a bundle in static folder. However I would like only logged in users to be able to access the bundle. I have tried to include the ja file, this works but it slows performan

Re: [web2py] how to start Celery worker in web2py

2018-11-04 Thread James O' Driscoll
windows service the best practice? Regards, James On Saturday, November 3, 2018 at 4:46:43 PM UTC+10, James O' Driscoll wrote: > > I have implemented the above, the gen_url function is working but the > add_user function is not (receiving the error db is not defined from > tasks

Re: [web2py] how to start Celery worker in web2py

2018-11-02 Thread James O' Driscoll
I have implemented the above, the gen_url function is working but the add_user function is not (receiving the error db is not defined.) Regards, James -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

Re: [web2py] Re: Updated Version of web2py and sending emails stopped working

2018-04-26 Thread James O' Driscoll
, 2018 at 6:10:28 PM UTC-7, Dave S wrote: >>>> >>>> >>>> >>>> On Wednesday, April 4, 2018 at 5:08:22 PM UTC-7, James O' Driscoll >>>> wrote: >>>>> >>>>> Any insights?? Surely this is not prefera

Re: [web2py] Re: Updated Version of web2py and sending emails stopped working

2018-04-04 Thread James O' Driscoll
please run connect() first”. Regards, James On Thu, 5 Apr 2018 at 11:13 am, Dave S wrote: > > > On Wednesday, April 4, 2018 at 6:10:28 PM UTC-7, Dave S wrote: >> >> >> >> On Wednesday, April 4, 2018 at 5:08:22 PM UTC-7, James O' Driscoll wrote: >

[web2py] Updated Version of web2py and sending emails stopped working

2018-04-04 Thread James O' Driscoll
Any insights?? Surely this is not preferable when people who have clients and have to update web2py get no support. -- 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 I

[web2py] Updated Version of web2py and sending emails stopped working

2018-03-31 Thread James O' Driscoll
All, Would really like an some help on this. I had to update web2py today for a client that has been using a version of web2py since early 2015. The update was due to the recaptcha v1 expiration and move to recaptcha v2. After the update I am unable to send emails from functions, which was wo

Re: [web2py] Re: RuntimeError: table appears corrupted

2016-10-11 Thread James O' Driscoll
I never figured out why this happened but I moved away from SQLite after this happened. I have not seen this error from postgres. On Tuesday, 27 September 2016, Maurice Waka wrote: > Good morning all. > I came across this post when searching for an answer. I got this error > from my app:: > Tr

[web2py] Re: model file not behaving correctly

2015-04-12 Thread James O' Driscoll
It was due to how I defined relationships between tables. e.g. db.define_table('table_name_1', Field('name')) # this is what caused the problem db.define_table('table_name'_2, 'reference db.table_name_1', Field('another_name') # this is ok db.define_table('table_name'_2, db.table_name_1, Field

[web2py] model file not behaving correctly

2015-04-09 Thread James O' Driscoll
I have been building an application with the model in a sqlite db. I received an error stating that the .table file was corrupted, while trying to resolve one .table file, revealed that all were corrupted. This forced me to backup all tables in the db, delete the db and started with a empty db

Re: [web2py] Re: RuntimeError: table appears corrupted

2015-03-31 Thread James O' Driscoll
I had the same problem today. Had server running for less than a month, the table was from SQLITE. I am looking for preventative measures rather than reactionary. Regards, James On Thursday, July 11, 2013 at 9:23:18 PM UTC+10, Tomek Krasuski wrote: > > THX. > > > > W dniu sobota, 29 grudnia 20

[web2py] Unittest GET request

2015-03-24 Thread James O' Driscoll
All, I am trying to unittest a GET request, I have had no problem testing all my other functions which were POST requests. I have a simple function, that takes two vars; a file name and a path and then downloads the file. def file_downloader(): if request.vars: filename = request.v

[web2py] Re: Adding

2015-03-06 Thread James O' Driscoll
. > Then configure auth.settings.mailer to user your mailer object. > > On Thursday, 5 March 2015 17:30:03 UTC-6, James O' Driscoll wrote: >> >> I am trying to place all email sent from app into queue. >> >> I am using scheduler and this works fine. >> >

[web2py] Adding

2015-03-05 Thread James O' Driscoll
I am trying to place all email sent from app into queue. I am using scheduler and this works fine. I want to add the email for verifying email, detailed below, to the queue. I would have taught that I have to append a mail function to the request_reset_password.onaccept, but this is not availab

[web2py] Re: Testing and web2py - especially appadmin

2015-02-11 Thread James O' Driscoll
All. I have not been receiving any feedback with regards testing. So are no tests available for key functions supplied with web2py, i.e. appadmin. If this is the case, it is a definite downside to the framework. Regards, James On Thursday, February 5, 2015 at 1:10:31 PM UTC+10, James O

[web2py] Re: web2py and security

2015-02-11 Thread James O' Driscoll
ime design goals of web2py. > > > On Wednesday, November 19, 2014 8:42:12 PM UTC-5, James O' Driscoll wrote: >> >> Are there any good resources on how to boost the security of web2py. >> >> Regards, >> >> James >> > -- Resources: - http://

[web2py] Re: unit testing controllers with auth decorators

2015-02-08 Thread James O' Driscoll
correctly. The problem I have is I need to login and then test the index() function which is decorated with @auth.requires_login(). Can anyone please let me know where I am going wrong. On Thursday, February 5, 2015 at 11:27:10 PM UTC+10, James O' Driscoll wrote: > > All, > > I

[web2py] Testing and web2py - especially appadmin

2015-02-05 Thread James O' Driscoll
I am currently working on creating tests for my default controller, I have found a few articles relating to web2py and unit testing, but not many. I have two questions: 1. Any recommendations for good resources available to help create tests for web2py. 2. Is there a doctest/unit test av

[web2py] unit testing controllers with auth decorators

2015-02-05 Thread James O' Driscoll
All, I am having trouble unit-testing web2py app controllers which are decorated with @auht.requires_login(). I think I am missing something declaring the enviroment as I get, auth is not defined error. It would be great if I could get some assistance on this. class TestListClients(unittest.Te

[web2py] Re: Ajax call does not redirect.

2015-01-21 Thread James O' Driscoll
Hey Leonel, I tried that, when I ran the code that you suggested, web2py did not redirect to display_canvas, Execution in the following order, with client_side=True: 1.run display_canvas 2.ajax call to display and with, with client_side=False: 1. run display_canvas 2. ajax call to

[web2py] Ajax call does not redirect.

2015-01-18 Thread James O' Driscoll
I am creating a canvas on a webpage to display some graphics. In order to create the graphics I need to grab the screen size of the device. To do this I am using a ajax call in the header of the view of the display_canvas function to pass the screen width to a helper function which redirect

[web2py] web2py and security

2014-11-21 Thread James O' Driscoll
Are there any good resources on how to boost the security of web2py. Regards, James -- 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 me

[web2py] Pack Custom, Failing

2014-10-31 Thread James O' Driscoll
All, I am trying to use Pack Custom option to make a slice. When I click the Pack Custom, I can see the tree file structure for a split second, then it disappears. I am using source distribution and I have used used the latest version to test. Any help would be great. Regards, James -- Re