Re: [web2py] Timeout for data entry screens: Help!

2021-01-29 Thread John Bannister
What database are you using? On Fri, 29 Jan 2021 at 16:12, Massimiliano wrote: > Reading better you message, I'm not sure that auth.settings.expiration is > what you need. > Sorry > > Il giorno ven 29 gen 2021 alle ore 16:10 Massimiliano > ha scritto: > >> You can set: >> >> auth.settings.expir

[web2py] Re: Why web2py App performance has degraded all of sudden with SQLLITE

2020-05-02 Thread John Bannister
Hi Sandeep, Would be good if you can supply a bit more information in order to help you find the solution. questions: 1: Has your database grown recently? 2: Is web2py slow on all queries or just on some tables? 3: Can you use _lasesql to see your sql calls and timings? 4: Are you using SQLFORM

RE: [web2py] Re: Py4web readonly Form

2020-03-21 Thread John Bannister
? On Friday, 6 March 2020 00:53:17 UTC-8, John Bannister wrote: Hi All, I have been testing Py4web and have the following to produce basically a 'view record' option :- def view_test(): form=Form(db.auth_user, record=1, readonly=True, deletable=False, formstyle=Form

[web2py] Py4Web fields of type 'upload' not working

2020-03-09 Thread John Bannister
Hi All, Still struggling a lot with fields of type 'upload'. Whatever I try the field remains None. Any help greatly appreciated. Typical use case is as follows: Model: db.define_table('test', Field('f_name'), Field('l_name'), Field('image', 'uplo

[web2py] Py4web working with images

2020-03-07 Thread John Bannister
Hi All, Has anyone got a working exsmple of working with images in Py4Web preferrably with thumbnails as well? Thanks in advance John -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] Py4web readonly Form

2020-03-06 Thread John Bannister
Hi All, I have been testing Py4web and have the following to produce basically a 'view record' option :- def view_test(): form=Form(db.auth_user, record=1, readonly=True, deletable=False, formstyle=FormStyleBulma) if form.accepted: redirect(URL('index')) return dict(form=for

RE: [web2py] Displaying only certain fields of choice with SQLFORM(...) update

2020-01-28 Thread John Bannister
If you don’t want the field to be displayed in the SQLFORM() you need to set as follows: db.table.fieldname.readable = db.table.fieldname.writable=False before the form initialisation. So something like :- db.dog.owner.readable=db.dog.owner.writable=False form = SQLFORM(db.dog) if form.pr

RE: [web2py] Re: Saving a view as an file/image

2020-01-28 Thread John Bannister
calls the above js function like this: Click to Download as PDF This should convert you view into PDF or Image as per the usage of both liraries. I hope the maintainers of the jsPDF & html2pdf libraries have not made adjustmets that may cause this not to work; Regards Mostwan

RE: [web2py] Re: Saving a view as an file/image

2020-01-28 Thread John Bannister
. On Sunday, 26 January 2020 14:25:47 UTC, John Bannister wrote: Hi All, I have hit a bit of a stumbling block and would like to know if anyone else has come across this and how to resolve it. Situation is as follows:- I am generating tickets/coupons for users once they have

[web2py] Saving a view as an file/image

2020-01-26 Thread John Bannister
Hi All, I have hit a bit of a stumbling block and would like to know if anyone else has come across this and how to resolve it. Situation is as follows:- I am generating tickets/coupons for users once they have entered all the appropriate info which I am doing via normal controller/view using

RE: [web2py] Looking for web2py developer for Italian small company

2020-01-22 Thread John Bannister
Dear Ivan, Would be interested if you are looking to use py4web and vue.js John From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Ivan Gazzola Sent: 21 January 2020 16:40 To: web2py-users Subject: [web2py] Looking for web2py developer for Italian small company

[web2py] Py4web Auth Equivalent

2019-12-27 Thread John Bannister
Hi All, I have played with py4web for a while now and one thing I cannot get my head around is how to set up the equivalent web2py auth groups, memberships in py4web? Are there any examples or documentation on how to use tags to set up the equivalent? Thanks in advance John -- Resources: -

RE: [web2py] Re: Web2py arabic translations not working

2019-10-28 Thread John Bannister
provide more info? Does it not identify the translation file? Does it not read it? Does it not translate properly? There should not be anything special about arabic other the it is Right to Left. On Tuesday, 22 October 2019 06:36:27 UTC-7, John Bannister wrote: Tried to use the ar.py file (usng

[web2py] Web2py arabic translations not working

2019-10-22 Thread John Bannister
Tried to use the ar.py file (usng T()) to translate some text to arabic. Seems that this does not work wheras the likes of Italian (it) does. Has anyone come acrross this issue with 2.18.5? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/we

RE: [web2py] Re: py4web Auth

2019-10-01 Thread John Bannister
the template as in: [[from app.thisapp.common import get_info, auth]][[info = get_info(auth)]] ... [[=info]] I like solution 2 best On Monday, 30 September 2019 09:50:07 UTC-7, John Bannister wrote: Hi Massimo, Not quite what I am after. Scenario which I have is that I have

RE: [web2py] Re: py4web Auth

2019-10-01 Thread John Bannister
output['info'] = get_info(auth) return output @action('index') @action.uses(auth, InfoInjector()) def index(): return dict() # info is automatically injected 3) add logic directly to the templ

RE: [web2py] Re: py4web Auth

2019-09-30 Thread John Bannister
Pierro Sent: 30 September 2019 17:12 To: web2py-users Subject: Re: [web2py] Re: py4web Auth In any action decorated with @action.uses(auth.user) you can do first_name = auth.get_user()['first_name'] Is this what you are asking? On Monday, 30 September 2019 01:07:23 U

RE: [web2py] Re: py4web Auth

2019-09-30 Thread John Bannister
Hi Massimo, Thanks very much. Will test and give you some feedback hopefully today. Is there some sort of way to access user info from layout.html for example across multiple modules without having to pass the user from each eaction in each module? I want to be able to display the user na

RE: [web2py] py4web questions

2019-09-26 Thread John Bannister
Thanks Massimo much appreciated and looking forward to the tutorial. Will check out the tag API in the meantime. -Original Message- From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimo Di Pierro Sent: 26 September 2019 09:02 To: web2py-users Subject: [web2p

[web2py] py4web questions

2019-09-25 Thread John Bannister
Hi All, Today have managed to play a bit with py4web with the view to developing a real-life app using the framework. In so doing I have hit a few 'challenges' which I am hoping someone will be able to help me with. 1: User will log in via default controller and based on access rights will ge

RE: [web2py] Re: py4web pythonanywhere bottle_app.py configuration

2019-09-24 Thread John Bannister
September 2019 02:29:49 UTC-7, John Bannister wrote: Hi All, Just watched the py4web video and would like to know if anyone has the bottle_app.py config that needs to be used in order to get the desired resuolts. Hard to make out in the video BR John -- Resources: - http://web2py.com - http

[web2py] py4web pythonanywhere bottle_app.py configuration

2019-09-23 Thread John Bannister
Hi All, Just watched the py4web video and would like to know if anyone has the bottle_app.py config that needs to be used in order to get the desired resuolts. Hard to make out in the video BR John -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

RE: [web2py] py4web has now a grid ...

2019-09-12 Thread John Bannister
Hi Massimo, Some feedback for you on the new grid (which is looking very cool) and which I played with a bit today. Basically I connected to a MySQL db and loaded some existing medium sized tables (~400K records) and sort of compared it with web2py grid (standard web2py) and also datat

RE: [web2py] py4web YATL equivalent of SCRIPT

2019-09-07 Thread John Bannister
Thanks Massimo, Will definitely take a look and do the necessary. With regards the general Auth functionalitly, do you have some example or guidelines as to how this will work? Thanks in advance -Original Message- From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Beha

[web2py] py4web YATL equivalent of SCRIPT

2019-09-06 Thread John Bannister
Hi All, Have finally had a bit of time to play again with py4web the objective being to port a smallish app from web2py to py4web (very much as a learning and familiarisation/evaluation exercise). The main objective is to see if I can create the equivalent of a working web2py app with py4web w

RE: [web2py] Re: Anthony was right... web3py has a big naming conflict

2019-07-22 Thread John Bannister
Why not something as simple as py3web From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Leonel Câmara Sent: 22 July 2019 16:26 To: web2py-users Subject: [web2py] Re: Anthony was right... web3py has a big naming conflict I would call it pywebal "python web abstract

RE: [web2py] web2py dynamic queries

2019-06-17 Thread John Bannister
Hi Cristina, Can you show us your view code as well? Assuming you are trying to use datatables instead of web2py Grid or Smartgrid (which gives you ability to build dynamic queries), you will probably need to loop through all the fields in the table (server side) and build your query bas

RE: [web2py] Re: Web3py FORM referenced fields

2019-06-12 Thread John Bannister
problem: http://127.0.0.1:8000/examples/dbform2 On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote: Hi All, Does anyone have a working example of web3py Form using referenced fields? I have created the standard person / pets tables with pets referencing person as

[web2py] Web3py FORM referenced fields

2019-06-12 Thread John Bannister
Hi All, Does anyone have a working example of web3py Form using referenced fields? I have created the standard person / pets tables with pets referencing person as 'reference person' in the table definition. Using form=Form(db.pet) I get the dropdown of persons for the add no worries but on th

[web2py] Re: Datatables serverside JSON/Ajax

2019-06-11 Thread John Bannister
@Leonel .. I think this will work well with client side but not serverside datables but may be wrong. @Cristina: My understanding of serverside processing is that you will need to have a few more items returned to datatables as outlined in the DT docs for serverside processing. Your response

RE: [web2py] Re: Web3py

2019-06-09 Thread John Bannister
Subject: [web2py] Re: Web3py try a db.commit() after your define_table(s). On Monday, 3 June 2019 08:16:27 UTC-7, John Bannister wrote: Hi All, Finally gotten round to playing again on the latest Web3py. On _scaffold app .. if I add new tables to model file and then reload from the

[web2py] Re: Web3py

2019-06-03 Thread John Bannister
assist wherever I can. Thanks again for all the hard work put in so far I am sure its gonna be a really cool solution. Best Regards John On Thursday, 16 May 2019 17:15:44 UTC+2, John Bannister wrote: > > Hi All, > > Had a first real 'play' with web3py' today and hav

RE: [web2py] Re: Web2py: Update table content after submit action

2019-05-26 Thread John Bannister
Hi Lovedie JC, Is there any reason why you don’t just use the SQLFORM.gird? You can check for the ‘new’ , ‘edit’ etc in request.args in the view and put the form in a modal or whatever styling you want to use. The alternative if you need to use the LOAD helper is probably to put both the

[web2py] Re: IS_NOT_EMPTY() "takes away" a dropbox with a list of items referenced by a foreign key -

2019-05-19 Thread John Bannister
Hi Vlad, I think I have come across this issue as well some time ago. Can you try IS_NOT_EMPY() OR IS_IN_DB(id ...) This should hopefully bring back your drop down list. BR John -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (S

Re: [web2py] Re: Web3py

2019-05-19 Thread John Bannister
just lists the apps/myapp as a dependency BR John On Sunday, 19 May 2019 11:38:07 UTC+2, John Bannister wrote: > > Hi Guys, > > Couple of things. > > 1: I added a print('Dependancies %s ' % reloader.get_dependencies(module)) > just before the output to console in we

Re: [web2py] Re: Web3py

2019-05-19 Thread John Bannister
Hi Guys, Couple of things. 1: I added a print('Dependancies %s ' % reloader.get_dependencies(module)) just before the output to console in web3py/core.py. Here is the output (not formatted):- Dashboard is at: http://127.0.0.1:8000/_dashboard [ ] loading examples ... Dependancies None [A[OK]

Re: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
No I initally tried from web3py folder to import apps.myapp.controllers.py but paths are relative and globals like evrirnment/gloabls like 'WEB3PY_APPS_FOLDER' are not available in the shell. (also tried from apps and myapp folder but same). Probably need to write a little script. So .. I liter

Re: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
Hi Stifan, I basically followed the example on the PyPi site which works fine. NB I did not manage to reload the modules in apps/myapp manually (from shell). Have not had too much time today to get into it deeply as have other commitments. I did however try to force the load_app to load as opp

RE: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
Hi Stifan, What OS are you testing on? BR John From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of ?? Sent: 18 May 2019 08:14 To: web2py-users Subject: Re: [web2py] Re: Web3py Also, web3py uses this: https://pypi.org/project/reloader/ The docs have an exa

Re: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
Running reload manually works as advertised on PyPi On Saturday, 18 May 2019 13:03:59 UTC+2, John Bannister wrote: > > Same result unfortunately > > On Saturday, 18 May 2019 10:50:34 UTC+2, Massimo Di Pierro wrote: >> >> what if you do not user tornado and replace

Re: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
Same result unfortunately On Saturday, 18 May 2019 10:50:34 UTC+2, Massimo Di Pierro wrote: > > what if you do not user tornado and replace > > bottle.run(server='tornado', host=host, port=int(port)) > > with > > bottle.run(host=host, port=int(port)) > > it is very strange. Please try test the rel

RE: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
_dashboard [OK] reloaded myapp [OK] reloaded todo [OK] reloaded superheroes [OK] reloaded examples [OK] reloaded _scaffold On Friday, 17 May 2019 16:03:18 UTC-7, John Bannister wrote: For me I have not installed any npm or other. Clean python 3 virtual environment into

Re: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
For me I have not installed any npm or other. Clean python 3 virtual environment into which I installed web3py on Ubuntu. Base install on windows 10 as well same. All works fine apart from the reloading. I can try to set up on one of my Centos 7 servers later tomorrow but am pretty sure its gon

Re: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
Update on this :- Just tried it on native windows10 python3.7 and same results. New functions return error 404 until server restart. BR John On Friday, 17 May 2019 18:49:28 UTC+2, 黄祥 wrote: > > problem still exist (in commits 110) only superheroes app traceback error > is gone when hit 'reloa

RE: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread John Bannister
As you are da man I would suggest DaQL .. DALQL is a bit of a mouth full J From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimiliano Sent: 17 May 2019 18:56 To: web2py@googlegroups.com Subject: Re: [web2py] Re: new DBAPI in pydal for both web2py and web3py DA

RE: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
web2py@googlegroups.com] On Behalf Of Massimo Di Pierro Sent: 17 May 2019 17:12 To: web2py-users Subject: Re: [web2py] Re: Web3py I fixed the database locking problem. missing db.commit() Editing apps and reloading forks for me. Please try again and let's try figure out why does not work f

RE: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread John Bannister
How about Despresso (for database express O ). J From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimo Di Pierro Sent: 17 May 2019 17:43 To: web2py-users Subject: [web2py] Re: new DBAPI in pydal for both web2py and web3py I am embarrassed I have forgotten all

RE: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
: [web2py] Re: Web3py yes. There is a button on the top/right of the dashboard "reload apps" On Thursday, 16 May 2019 08:15:44 UTC-7, John Bannister wrote: Hi All, Had a first real 'play' with web3py' today and have a few questions the biggest of which I am hoping

Re: [web2py] Web3Py equivalent of SQLFORM.grid

2019-05-16 Thread John Bannister
Hi Massimo, Had a quick look at the mtable prototype in the _dashboad/dbadmin and re-visiting datatables as well. Will need to spend a bit more time on both before I can come to any sort of solution but thanks very much for the input. On Thursday, 16 May 2019 16:50:48 UTC+2, Massimo Di Pierro

[web2py] Web3py

2019-05-16 Thread John Bannister
Hi All, Had a first real 'play' with web3py' today and have a few questions the biggest of which I am hoping the gurus will be able to answer:- 1: Is there any way to not to have to restart the app every time changes are made to actions in the controller or new actions added etc? I understand

Re: [web2py] Web3Py equivalent of SQLFORM.grid

2019-05-16 Thread John Bannister
field that is a datetime': > datarow[col] = row[col].strftime('%Y-%m-%d %H:%M:%S') > else: > datarow[col] = row[col] > else: > datarow[col] = '' > > aaData.app

Re: [web2py] Web3Py equivalent of SQLFORM.grid

2019-05-16 Thread John Bannister
mand, > the datatable works fine showing hundred of rows from a table. > > You have to make your own code for the server side, to support filter or > sort if you need them, but it's quite straightforward. > > José L. > > El jue., 16 may. 2019 a las 11:42, John Bannister (

[web2py] Web3Py equivalent of SQLFORM.grid

2019-05-16 Thread John Bannister
Hi All, I have a number of web2py applications that use the grid/smartgrid functionality pretty heavily. The majority of the applications are working with large data sets (some tables have > 20M records) and everything runs fine. With the coming of Web3Py (which looks great) my question is wha

RE: [web2py] Confirmation forms. The book is unclear. How can I associate a pop confirmation box with a link?

2019-05-03 Thread John Bannister
I came across the same issue recently and managed to solve it as follows:- lambda row: A(SPAN('Delete', _class="button btn btn-info btn-sm", _title='Delete', _onclick = "return confirm('Are you sure?');"), \ _href=URL("default", "delete_company",args=[row.id])),

RE: [web2py] Re: Modules not loading in python 3

2019-04-11 Thread John Bannister
error, custom_import will give this message of "applications.app_name.modules.module_name" not found. Le dimanche 7 avril 2019 06:18:03 UTC+2, John Bannister a écrit : Hi all, I have recently upgraded to python 3.6 from 2.7 running on Centos7 with apache. Problem I am ha

[web2py] Modules not loading in python 3

2019-04-06 Thread John Bannister
Hi all, I have recently upgraded to python 3.6 from 2.7 running on Centos7 with apache. Problem I am having is as follows:- 1: I have a number of apps each of which has a number of modules. Whilst it seems that I can import modules from paython (such as pytz etc) and I can also import modules