[web2py] Re: web2py 2.15.0b1

2017-07-07 Thread Dave S
On Thursday, July 6, 2017 at 3:29:11 AM UTC-7, Dave S wrote: [...] > For the other, my controller does the usual "form = SQFORM(db.tab2)", where > tab2 has a field "partof" ref tab1, and a string field I want to get > autofocus, so I set the widget, and I set the default value for a boolean >

[web2py] Re: Any ideas on how to prepare web2py apps for GDPR

2017-07-07 Thread Dave S
On Thursday, July 6, 2017 at 2:48:47 PM UTC-7, Pbop wrote: > > Making an app ready for GDPR compliance does not have some checklist and > is an ongoing commitment to privacy and security by design. Web2Py aligns > well with GDPR in many ways out of the box. Here is a fairly comprehensive > to

Re: [web2py] Re: SQLFORM.grid with selectable checkboxes that export CSV files on submit

2017-07-07 Thread 'Matthew J Watts' via web2py-users
thanks Peter, as for the grid i'm currently trying to work out how to customize it, but yes i think the "buttons_placement = 'right' " puts the buttons on the right On Wednesday, July 5, 2017 at 4:39:17 AM UTC+2, Peter wrote: > > > Glad you got something out of it Matt! > > I decided to try an

[web2py] Re: DAL pg8000 adapter and JSON type

2017-07-07 Thread Massimo Di Pierro
Please open a pydal issue so we can track this. On Wednesday, 5 July 2017 15:49:14 UTC-5, Massimo Di Pierro wrote: > > what do you mean by " manually altered the type to JSON"? Anyway, please > use psycopg2 instead of pg8000. > > On Tuesday, 4 July 2017 04:03:00 UTC-5, lyn2py wrote: >> >> I'm usi

[web2py] Re: Limit the field to search in sqlgrid?

2017-07-07 Thread 'Matthew J Watts' via web2py-users
I'm trying to do the same, can anyone help? On Friday, June 28, 2013 at 3:03:12 AM UTC+2, fun man wrote: > > Hi all, > > I have a couple tables joined in the sqlform.grid. They both have around > 20 fields. I am only displaying around 10~15 fields for a particular > purpose. > > When I click

[web2py] db structure graphical analysis tool

2017-07-07 Thread Jurgis Pralgauskis
Hi, in our DB we have ~300 tables. So I hacked into graph_model to filter shown tables/fields. It was very helpfull for me when I joined the project with so many tables. The most common use case -- searching for possible join-paths between two tables, but also can filter by (fragments of) tab

[web2py] autobuild'ing web2py models from MySQL metadata?

2017-07-07 Thread Jurgis Pralgauskis
Hi, As I understand I could autogenerate table definitions from MySQL INFORMATION SCHEMA (mostly TABLES and COLUMNS tables). And references should be figured out somehow (probably in custom way) Maybe someone has tried this? Prob

[web2py] Grid - limit searches to specified fields not whole tables

2017-07-07 Thread 'Matthew J Watts' via web2py-users
Hi all I’m having problems trying to tailor the grid to my needs I've set up a grid to query my db and it retrieves the data successfully, great! Example: def gridquery(): grid = SQLFORM.grid((db.MAIN.TaxonID == db.TAXON.TaxonID), field_id = db.MAIN.MainID, fields=[db.TAXON.Ta

Re: [web2py] db structure graphical analysis tool

2017-07-07 Thread António Ramos
+1 good job 2017-07-07 12:19 GMT+01:00 Jurgis Pralgauskis : > Hi, > > in our DB we have ~300 tables. So I hacked into graph_model to filter > shown tables/fields. > It was very helpfull for me when I joined the project with so many tables. > The most common use case -- searching for possible jo

[web2py] Re: Grid - limit searches to specified fields not whole tables

2017-07-07 Thread Anthony
I think you'll need a custom search widget and/or search function (the latter via the "searchable" argument). For details on how the current default search widget is constructed, see https://github.com/web2py/web2py/blob/89832479fccf6bb2d0ef19427bff2ee7f5347807/gluon/sqlhtml.py#L2618. Note, it

[web2py] Re: Limit the field to search in sqlgrid?

2017-07-07 Thread Anthony
See https://groups.google.com/d/msg/web2py/--XcMFzpBn0/LYiwKoc-CQAJ. On Thursday, June 27, 2013 at 9:03:12 PM UTC-4, fun man wrote: > > Hi all, > > I have a couple tables joined in the sqlform.grid. They both have around > 20 fields. I am only displaying around 10~15 fields for a particular > pu

Re: [web2py] Update hidden field / id for hidden field

2017-07-07 Thread Richard Vézina
I give a look to daterange, I am not sure how it can be integrate without yout to create your own piece of js code to handle the splitting of the 2 dates... daterangespicker seems to requires you to use a single field to store the information... So you have 2 options, you create a single field in y

[web2py] Re: Grid - limit searches to specified fields not whole tables

2017-07-07 Thread 'Matthew J Watts' via web2py-users
Ok thanks Antony i'll look into it, this looks like it could take some time!! On Friday, July 7, 2017 at 2:42:37 PM UTC+2, Matthew J Watts wrote: > > Hi all > > > > I’m having problems trying to tailor the grid to my needs > > I've set up a grid to query my db and it retrieves the data successf

[web2py] Re: Update hidden field / id for hidden field

2017-07-07 Thread Anthony
Why do your hidden fields need ids? Note, you can always create the hidden fields manually rather then using the "hidden" argument: hidden = lambda f, v: INPUT(_name=f.name, _id=f.name, _type='text', _value=v ) form = SQLFORM.factory(Field('hidden_field', widget=hidden)) Anthony On Thursday, J

[web2py] Re: trigger some js code on successful login

2017-07-07 Thread Pierre
@Leonel : trying to do a *localforage records manager*.it uses 3 js libraries localforage, axios and sjcl ; it's not very complicated, basically a 3 levels promises chain that encrypts, decrypts , checks data integrity and release data if everything ok @Anthony: here is the new *user.

[web2py] update_or_insert from dictionary?

2017-07-07 Thread admin
We can insert and update from a dictionary, but its not possible to do the same with "update_or_insert"? Is there a simple way to achieve that, or would it require changes to that dal function? http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inserting-and-updat

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread Anthony
On Friday, July 7, 2017 at 2:27:52 PM UTC-4, ad...@swcacloud.com wrote: > > > We can insert and update from a dictionary, but its not possible to do the > same with "update_or_insert"? Is there a simple way to achieve that, or > would it require changes to that dal function? > > > http://www.web

[web2py] Re: Whoosh

2017-07-07 Thread Ben Lawrence
Ron, is whoosh faster than the database search e.g. pydal's like, ilike, regexp, startswith, endswith, contains, upper, lower ? On Saturday, March 7, 2015 at 10:29:58 AM UTC-8, Ron Chatterjee wrote: > > web2py lived up to its promise again and delivered!!! works like a champ. > One line put all

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread admin
Thanks for the quick reply. I'm not having any luck with update_or_insert, but insert and update work fine individually. I'm using keyed tables, so that may be why. On Friday, July 7, 2017 at 11:40:55 AM UTC-7, Anthony wrote: > > On Friday, July 7, 2017 at 2:27:52 PM UTC-4, ad...@swcacloud.c

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread Anthony
Can't help if we don't see some code. On Friday, July 7, 2017 at 5:23:55 PM UTC-4, ad...@swcacloud.com wrote: > > Thanks for the quick reply. I'm not having any luck with > update_or_insert, but insert and update work fine individually. I'm using > keyed tables, so that may be why. > > > > On

[web2py] Re: web2py 2.15.0b1

2017-07-07 Thread Dave S
On Friday, July 7, 2017 at 1:55:33 AM UTC-7, Dave S wrote: > > > > On Thursday, July 6, 2017 at 3:29:11 AM UTC-7, Dave S wrote: > [...] > >> For the other, my controller does the usual "form = SQFORM(db.tab2)", where >> tab2 has a field "partof" ref tab1, and a string field I want to get >> aut

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread admin
Sorry about that, my code is in flux right now as I'm working through it. Here are two methods that are working: db[table_name].insert(**r) db(db[table_name]._id == current_id).update(**r) These methods aren't working: db[table_name].update_or_insert(**r) db[table_name].update_or_insert(db[

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread Anthony
On Friday, July 7, 2017 at 7:57:57 PM UTC-4, ad...@swcacloud.com wrote: > > Sorry about that, my code is in flux right now as I'm working through it. > > > Here are two methods that are working: > > db[table_name].insert(**r) > > db(db[table_name]._id == current_id).update(**r) > > > These methods

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread admin
I'll need to try this with a simpler table and dictionary next week. The table and dictionary I'm working with now has about 50 fields, and the insert and update methods are working fine with that. I wrapped it all in a try/except/else statement with db.rollback() and db.commit() to help with

[web2py] Re: adapt sqlform.factory into form

2017-07-07 Thread 黄祥
list_show_0 = [('test0', T('Test0') ), ('test1', T('Test1') ) ] form_field_checkbox = lambda list_show, name: \ #DIV(*[DIV(INPUT(_type = 'checkbox', _value = value, _name = name), LABEL(label) ) for value, label in list_show], requires = IS_NOT_EMPTY() ) #DIV(*[DIV(INPUT(_t