Re: [web2py] Re: how does search work on sql grid? (search over a whole table instead of a field)

2015-05-10 Thread Kenny Chung
Thank you! your customer search function example answers my question. just curious, does SQL grid search function work same way as your search function example? On Sun, May 10, 2015 at 11:47 PM, Anthony wrote: > Basically I have 5 fields (last_name, middle_name, first_name, >> mother_full_nam

[web2py] Re: how does search work on sql grid? (search over a whole table instead of a field)

2015-05-10 Thread Anthony
> > Basically I have 5 fields (last_name, middle_name, first_name, > mother_full_name, father_full_name) in a table called names, > > When I search a keyword "john", I would like to search it on a whole > table. For example, is there any way to just do > db(db.names.contains("%john%")) and it g

[web2py] Re: how does search work on sql grid? (search over a whole table instead of a field)

2015-05-10 Thread Kenneth
Hope this clarifies my question. Basically I have 5 fields (last_name, middle_name, first_name, mother_full_name, father_full_name) in a table called names, When I search a keyword "john", I would like to search it on a whole table. For example, is there any way to just do db(db.names.contains(

[web2py] Re: how does search work on sql grid? (search over a whole table instead of a field)

2015-05-10 Thread Anthony
Sorry, you said you want to "search a keyword on a table instead of selecting fields"? Perhaps you can clarify what you are trying to achieve. Anthony On Sunday, May 10, 2015 at 11:07:49 PM UTC-4, Kenneth wrote: > > Hi Anthony, > > Thank you for your reply as always. I believe the forwarded post

[web2py] Re: how does search work on sql grid? (search over a whole table instead of a field)

2015-05-10 Thread Kenneth
Hi Anthony, Thank you for your reply as always. I believe the forwarded post is about how to show only a search option for searching throught a whole table. so unfortunately that post doesn't answer my question. Do you know how the search works behind of sql grid form? Thank you. On Sunday,

[web2py] DAL and Json query

2015-05-10 Thread IVINH
Hi all, How DAL is supported json query? My test is on Web2py by source code v.2.10.3, PostgreSQL 9.4: db.define_table('person', Field('name','string'), Field('jdata','json')) db.person.insert(name='Adam',jdata='{"age":30}') print db.executesql('SELECT * FROM person WHERE (jdata ->> "age") > "

[web2py] Re: auth_permission for group of records based on column value?

2015-05-10 Thread Alex Glaros
if there was a way to make only specific tables multi-tenant, that would work as well -- 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 m

[web2py] Re: Bootstrap datepicker plugin

2015-05-10 Thread villas
Hi Leonel I was trying out your widget but hit a problem... maybe there is a bug? Best regards, D Traceback (most recent call last): File "C:\Users\David\Documents\GitHub\web2py\gluon\restricted.py", line 227, in restricted exec ccode in environment File "C:/Users/David/Documents/Git

[web2py] Re: auth_permission for group of records based on column value?

2015-05-10 Thread Alex Glaros
Prefer not to address permissions in controller. One problem is in grid, user can change the parms in the address bar and start editing another user's data Tried doing a record-by-record check below in grid but creates false positive each time db.auth_group.organizationID.represent = lambda v

[web2py] auth_permission for group of records based on column value?

2015-05-10 Thread Alex Glaros
is there a way to use auth_permission to allow user to modify a large number of records based upon field value? right now in auth_permission we can only specify one record_id in a table. what about all records in a table whose field matches: organization_id = 'IBM'? is there a way to allow use

[web2py] Re: MSSQL and auth.signature

2015-05-10 Thread Niphlod
this is a well-known "bug" . MSSQL doesn't support creating references with cascades that reference something else that cascades (i.e. only one is allowed). There's a workaround : it's all documented here : http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#MSSQL--Micr

[web2py] Re: web2pyslices down

2015-05-10 Thread Alan Etkin
> > Web2pysplices.com is on sale > Cool! And what about web2pyslices.com, is it on sale also? -- 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 re

Re: [web2py] Re: SQLFORM.smartgrid and constraint

2015-05-10 Thread 黄祥
please check the book ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Logical-operators best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/we

[web2py] Re: invalid literal for int() with base 10: running mongodb

2015-05-10 Thread Ron Chatterjee
I take this back. I believe I need to pass comment ids instead of string. On Sunday, May 10, 2015 at 12:11:25 PM UTC-4, Ron Chatterjee wrote: > > I will. Thanks Paolo. > > Regards, > Ron > > > > On Sunday, May 10, 2015 at 11:49:37 AM UTC-4, Paolo Valleri wrote: >> >> Hi Ron, please open an issue

[web2py] Re: invalid literal for int() with base 10: running mongodb

2015-05-10 Thread Ron Chatterjee
I will. Thanks Paolo. Regards, Ron On Sunday, May 10, 2015 at 11:49:37 AM UTC-4, Paolo Valleri wrote: > > Hi Ron, please open an issue on https://github.com/web2py/pydal/issues > it seems that mongo adapter doesn't support "list:reference table" yet > > On Sunday, May 10, 2015 at 4:09:51 PM UT

[web2py] Re: custom form validation doesn't work

2015-05-10 Thread Anthony
That doesn't necessarily sound like the same issue. Please show some code and explain what you expect and what you see instead (maybe start a new thread). On Sunday, May 10, 2015 at 10:01:54 AM UTC-4, Thomas Sitter wrote: > > Hi Massimo, > > I am getting this same issue (onvalidation function no

[web2py] Re: invalid literal for int() with base 10: running mongodb

2015-05-10 Thread Paolo Valleri
Hi Ron, please open an issue on https://github.com/web2py/pydal/issues it seems that mongo adapter doesn't support "list:reference table" yet On Sunday, May 10, 2015 at 4:09:51 PM UTC+2, Ron Chatterjee wrote: > > I have the following in model. I get an error invalide literal for int > when I add

[web2py] invalid literal for int() with base 10: running mongodb

2015-05-10 Thread Ron Chatterjee
I have the following in model. I get an error invalide literal for int when I add the line Field("comments", "list: reference comment"). Otherwise it works fine db.define_table('Post', Field('author'), Field('content','Text'), Field("tags","list

Re: [web2py] Re: SQLFORM.smartgrid and constraint

2015-05-10 Thread Sairam Kolla
it works!. Thankyou.I have another question.What if there are multiple queries.What is the syntax? eg: query1= db.posts.created_by==auth.user_id query2=db.posts.gender=='male' (assume there is a field called gender) On Mon, May 4, 2015 at 9:15 AM, 黄祥 wrote: > e.g. > def view(): > constrain

[web2py] Re: custom form validation doesn't work

2015-05-10 Thread Thomas Sitter
Hi Massimo, I am getting this same issue (onvalidation function not getting called), but I am use SQLFORM and not Crud so the solution posted does not apply to me. Has this been resolved elsewhere? Thanks. Tom On Saturday, 15 December 2012 18:27:51 UTC-5, jonas wrote: > > Hi. > > I have a def

[web2py] Something went wrong when I copied the web2py folder

2015-05-10 Thread Joe
I offten create back ups for my web2py folder, copying the entire folder from mu computer to an external hard disc. During the last back up something interesting happened. When I try to manage and edit one of the apps in the back up folder on the external disc, I get this error msg: *Synt

[web2py] Re: web2pyslices down

2015-05-10 Thread kenny c
Thank you. Hope web2pyslices finds new home soon. On Saturday, May 9, 2015 at 9:33:36 AM UTC-4, Michael Beller wrote: > > In the meantime ... http://web2pyslices.pythonanywhere.com/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] web2pyslicesgate

2015-05-10 Thread Alan Etkin
I forgot I was the web2pyslices app admin :P To all users complaining about their articles not being shown on the site, please, don't sue me. BTW: there seem to be some issue about the web2pyslices.com domain, since the one that is working is web2pyslices.pythonanywhere.com -- Resources: - ht

[web2py] About Leonel's threaded comment example

2015-05-10 Thread Alan Etkin
Ron's question about the app posted at https://groups.google.com/d/msg/web2py/sbgzu1zUAqY/8h1P7-6boSgJ by Leonel Do you know if its possible to implement this app without using any > javascript and nested structure but just applying pymongo freature? > Does pymongo provide client-side features?

Re: [web2py] Re: Creating a grid based on queries pertaining to a primary db table, and a table that references it

2015-05-10 Thread Massimiliano
Another way: tc = t.with_alias('chairs') q = (tc.name == 'chair') q = q & (t.name == 'table') q = q & (t.owner_id == tc.owner_id) q = q & (p.id == tc.owner_id) print db(q).select(*fields, distinct=True, orderby=p.first_name) On Sat, May 9, 2015 at 9:24 PM, Spokes wrote: > Thanks, Massimilian

[web2py] Replacing layout.html with an AdminLTE dashboard

2015-05-10 Thread Tom Campbell
AdminLTE is a beautiful dashboard template. Using it in my current project, and I've posted it to Github at AdminLTE-web2py . Let me know what egregious mistakes I've made. I did follow along with my tutorial to