[web2py] SQLFORM.grid changes request

2014-07-08 Thread Yebach
Hello When I try to put form = SQLFORM.grid(db.mytable) in my controller the request changes to my/web/site/view?_signature=520af19b1095db04dda2f1b6cbea3a03c3551e13 which causes my if statement in controller to collapse. Can smbd please explain why this happens? thank you -- Resources: -

[web2py] SQLFORM.grid woes

2014-06-26 Thread hvjunk
Hi there, Yes I'm new to wep2py *and* to Python (other than having edited some Gentoo ebuilds many summers ago), but it was the advice for the simplest web framework to create simple input/edit functionality for a database to have customer details captured in a closed environment (ie. only

[web2py] sqlform.grid add new - populate some fields(with values from another db) based on other fields

2014-06-22 Thread Peter
Hi. Im new to web2py. I have gone through most of the ducumentation and videos but im still stuck. Here is the scenario: db : stockitems fields(itemcode, itemName, sellingPrice) db : sales fields(date,itemcode,itemname, sellingprice,qty,amount) I have a sqlform.grid from db.sales

[web2py] SQLFORM.grid search - boolean precedence? - nested queries?

2014-06-12 Thread Vincent
How would one go about doing the equivalent of A and (B or C) in the grid or smartgrid search? Tried reading the source but got lost. Given db.person.firstname db.person.lastname this fails as an invalid query: person.firstname = John and (person.lastname = Smith or person.lastname =

[web2py] sqlform.grid with linked tables

2014-05-20 Thread Juan Luis
Hola, yes learning web2py basics. Could someone explain what I need to do to generate a sqlform.grid with two tables (one to many) that provides an href in one column? The table i want to create would look like: Contact | URL ---

Re: [web2py] SQLFORM.grid search with custom request.vars

2014-05-06 Thread Paolo Valleri
If I change the search form action to POST the whole url is preserved, and the keywords variable is passed as request payload. However the search doesn't work, I guest I have to change sqlform.grid in order to allows vars as post_vars, is there a specific reason for having the search action as

Re: [web2py] SQLFORM.grid search with custom request.vars

2014-05-06 Thread Anthony
On Tuesday, May 6, 2014 11:49:06 AM UTC-4, Paolo Valleri wrote: If I change the search form action to POST the whole url is preserved, and the keywords variable is passed as request payload. However the search doesn't work, I guest I have to change sqlform.grid in order to allows vars as

[web2py] SQLFORM.grid search with custom request.vars

2014-05-05 Thread Paolo Valleri
Dear all, I've implemented a method which uses SQLFORM.grid to show a subset of a given table. The query that defines the subset is built using a variable passed to the method through request.vars.*. Everything works as expected but search, namely when I type search for something all former

Re: [web2py] SQLFORM.grid search with custom request.vars

2014-05-05 Thread Richard Vézina
Maybe there is a need for vars property that could work similarily as args of SQLFORM.grid? Richard On Mon, May 5, 2014 at 8:28 AM, Paolo Valleri paolo.vall...@gmail.comwrote: Dear all, I've implemented a method which uses SQLFORM.grid to show a subset of a given table. The query that

[web2py] SQLFORM.grid pagination problem

2014-04-30 Thread Elcimar
I have a website that uses SQLFORM.grid. Some (random) times the grid starts in page # 1000, 100, etc (random pages) instead of page #1. I first thought it was because I was using two grids in the same page, but now that I am rendering them through LOAD, I don't know what is happening. It

[web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard
Hello, Is there a way to tell SQLFORM.grid to only allow simple search? I mean, not have the query constructor to appear, just the search box where we can search in all the fields? Thanks Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
This could be a new feature for .grid()... In gluon/sqlhtml.py near line 2261... This : INPUT(_name='keywords', _value=request.vars.keywords, _id=skeywords_id, _onfocus=jQuery('#%s').change();jQuery('#%s').slideDown(); % (spanel_id, sfields_id)), Could become this :

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Anthony
Maybe call it advanced_search. On Wednesday, April 23, 2014 1:52:59 PM UTC-4, Richard wrote: This could be a new feature for .grid()... In gluon/sqlhtml.py near line 2261... This : INPUT(_name='keywords', _value=request.vars.keywords, _id=skeywords_id,

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
Yop, you are right! I will send a PR on github and see what happen... Richard On Wed, Apr 23, 2014 at 2:19 PM, Anthony abasta...@gmail.com wrote: Maybe call it advanced_search. On Wednesday, April 23, 2014 1:52:59 PM UTC-4, Richard wrote: This could be a new feature for .grid()... In

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
https://github.com/web2py/web2py/pull/428 On Wed, Apr 23, 2014 at 2:24 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Yop, you are right! I will send a PR on github and see what happen... Richard On Wed, Apr 23, 2014 at 2:19 PM, Anthony abasta...@gmail.com wrote: Maybe call it

[web2py] SQLFORM.grid and in-place-update

2014-04-21 Thread Jayadevan M
I am learning how to use SQLFORM.grid. I am able to display a set of records. 1) If the user clicks on Edit for a record, it goes to a new page and also displays all the columns (though I chose only a few fields in the grid). How can I avoid that? 2) Is it possible to update multiple records

[web2py] SQLFORM.grid search fields

2014-04-17 Thread John Fraser
How would one go about making certain fields readable (visible) to the search, view, edit, etc, but hidden from the actual grid. Below is my code that accomplishes the hiding the fields from the main grid, but struggling with making them readable to the search: @auth.requires_login() def

[web2py] SQLFORM.grid Export and represent

2014-04-16 Thread John Fraser
Is there an easy way to strip HTML markup from SQLFORM.grid's CSV/TSV export? I realize I probably need to create a custom export function, but curious if there is an argument or a one liner that would do the trick. Or is there a better way to format the display? I have the following

[web2py] sqlform.grid - is there a way to set a column to certain value when entering new rows?

2014-03-03 Thread Dragan Matic
I have a grid and would like to show only rows where mytable.my_column == certain value form = SQLFORM.grid(db.my_table.my_column == my_value) and I would also like that every new row has the same predefined value. Is there a way to say to a grid that every new row should have

[web2py] SQLFORM.grid to update page

2014-02-28 Thread horridohobbyist
I have a SQLFORM.grid and I would like to add a link or function to each row that will do something and immediately refresh/update the webpage. Is this possible? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] SQLFORM.grid pagination and messed up URL

2014-02-28 Thread horridohobbyist
I have a SQLFORM.grid with pagination. It's in a webpage with the following URL: https://mydomain.com/myapp/admin/view_client/auth_user/3 When you go to the next page of the grid, the URL becomes: https://mydomain.com/myapp/admin/view_client?page=2 However, this is patently wrong! The URL

[web2py] SQLFORM.grid and custom edit form

2014-02-20 Thread Luca Guerrieri
Dear all, after some new things i have understood on web2py I'm not able to find this solution : I've a sqlform.grid which becomes from a 2 tables query ... some customization code form = SQLFORM.grid(query=query, left = db.mylist.on(db.person.id == db.mylist.name ) , field_id =

[web2py] SQLFORM.grid buttons as text

2014-02-18 Thread horridohobbyist
I've applied a layout that I downloaded from web2py.com. The layout turns the Edit and Delete buttons of SQLFORM.grid into textual links (anchors): Edit and Delete. However, the two text labels run together like so: EditDelete. I'd like to put some space between them, ie Edit Delete. I

[web2py] SQLFORM.grid Search

2014-02-17 Thread horridohobbyist
I'm using SQLFORM.grid for my application. It's very powerful and saves me a lot of work. However, I would like to alter/customize the search function in the grid. Is there a way for me to do this? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] SQLFORM.grid would like to redirect to edit page immediately after new record

2014-02-13 Thread Jim S
Wondering how I can use the oncreate callback to redirect to my edit page after I just created a new record. This is my callback function: def postCreate(form): equipOrderId = form.custom.dspval.equipOrderId

[web2py] SQLFORM.grid, how to edit non-visible field in the onvalidate function?

2014-02-07 Thread A36_Marty
I'm stumped. Have tried this with the grid, custom forms, etc. Could someone advise how to achieve the questions highlighted below - or - if it can't be done with a grid, how to achieve it? db.define_table('table', Field('field_hidden', 'string'),

[web2py] sqlform.grid and links

2014-02-02 Thread Howmahgee
Hi, Im a noob at web2py and have a question. Im setting up an interface so certain members of a group can analyze the information from two databases. One database is auth_user and the other database Info has a single corresponding entry for each user in auth_user. I have made an sql grid which

[web2py] SQLFORM.grid ondelete not working

2014-01-24 Thread horridohobbyist
I'm using Version 2.4.2. I'm finding that the ondelete function is never called when I delete a record in SQLFORM.grid. Is this a bug, or am I doing something wrong? The onupdate function does get called when I update a record. Thanks. -- Resources: - http://web2py.com -

[web2py] SQLFORM.grid and smartgrid translate headings

2014-01-21 Thread Boris Aguilar
Do table headings can be translated when creating an smartgrid or grid? I can't find it on documentation. (and entries don't get created in my languages files) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] SQLFORM.grid flexibility

2014-01-19 Thread horridohobbyist
I'm new to web2py and I'm playing around with SQLFORM.grid. I notice that the display of string fields truncates at 20 characters, whereas SQLTABLE did not impose such a limit. How do I loosen up this limit? Also, while I can disable exportclasses, I can't get rid of the Export: label beneath

[web2py] SQLFORM.grid oncreate how can I find out the ID of the record just created?

2014-01-06 Thread Jim S
Using SQLFORM.grid, created a function assigned to the oncreate callback. SQLFORM.grid(., oncreate=myfunction) def myfunction(form): redirect(URL('workorders',args=('workorder','edit',form.vars.workorderId),user_signature=True)) return But, I'm getting a value of None passed for

[web2py] SQLFORM.grid edit form pre populate field

2013-12-06 Thread Ivo
Does anyone know how to pre populate a field when using the SQLFORM.grid edit function? I know that for a new record you can use: if request.args[-3] == edit: db.table.field.default = 'foo' but if the field already contains a value it gets ignored. so I tried: value = auth.user.value if

[web2py] SQLFORM.grid edit form restrictions

2013-12-03 Thread Ivo
Hi, I have want to set some restrictions on editable fields in a edit form grid. This is the form def product(): grid = SQLFORM.grid(db.product, columns=[ db.product.name, db.product.description, db.product.price,

[web2py] SQLFORM.grid: CSV Export leads to empty file when using joined fields in query

2013-12-03 Thread Friedrich Weber
Hi there, First: I already tried to post this last week, but it doesn't seem like it worked. Apologies if this is a duplicate! I stumbled upon a bit obscure behaviour using SQLFORM.grid, left joins and CSV exports using 2.8.1-stable+timestamp.2013.11.27.20.07.10. It seems to be closely

[web2py] SQLFORM.grid builds create/edit pages for wrong table

2013-11-29 Thread Jim S
I have the following code: # Build query queries = [] if searchText and searchText.strip() != '': queries.append((db.auth_group.role.contains(searchText)) | (db.auth_user.firstLast.contains(searchText)) |

[web2py] sqlform.grid custom single row view

2013-11-28 Thread Gael Princivalle
Hi. I've saw here how is it possible to customize a single row view from a sqlform.grid: https://groups.google.com/forum/#!search/single$20datable$20record$20formatting/web2py/jZ1nkcIUcKc/EpvAuAL_VXYJ What I don't know is how calling single row data. For example you have this sqlform.grid in

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Johann Spies
Why not use the 'group by' in the creation of the view and then you can just view the view using the grid with no need to group by again in the grid? Regards Johann On 13 November 2013 03:06, Meir mmaalbuquer...@hotmail.com wrote: Hello, I have the following problem: I have created a view

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Meir
Hello Johann, It's why I created this view with the concept of cube to BI. I carry a lot of information forlater summarize according to the parameters of the users, but this I do in web2py. I'm working with web2py like my small BI ... Then the assembly is accomplished in various ways as

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Meir
Hello Johann, It's why I created this view with the concept of cube to BI. I carry a lot of information forlater summarize according to the parameters of the users, but this I do in web2py. I'm working with web2py like my small BI ... Then the assembly is accomplished in various ways as defined

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Niphlod
you can't have a column in the grid with a groupby that is not the groupby itself or an aggregate of another column, just like you can't in SQL. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] SQLFORM.grid to view and using groupby clause

2013-11-12 Thread Meir
Hello, I have the following problem: I have created a view in the legacy database. In this view created a field ID of type integer and unique. I used SQLFORM.grid using fields = [...] to specify the fields that wanted and used the groupby = ... to perform clustering. But it returns an error

Re: [web2py] SQLFORM.grid prints output to console

2013-10-17 Thread Johann Spies
There is a print statement in gluon/sqlhtml.py at line 2373 if I am remember correctly. Just comment it out or remove the line. This was already done in the trunk. Regards Johann On 16 October 2013 06:26, Hadi Sunyoto hadisuny...@gmail.com wrote: I just check the newest version 2.7.4 in

[web2py] SQLFORM.grid oncreate Issue

2013-10-16 Thread Christian Espinoza
Hi guys, I'm using 2.6.4-stable+timestamp.2013.09.22.01.43.37 and I trying to log at db every new record created with SQLFORM.grid: My controller: def bodies(): grid = SQLFORM.grid(db.bodies, orderby=~db.bodies.id, oncreate= log_action('System','Created new body')) return

[web2py] sqlform.grid boolean field search doesn't return any rows

2013-10-11 Thread Adi
Search: table.field = on (shows rows with T) table.field != on (no rows, even though there are some F's) 2.7.3-stable+timestamp.2013.10.11.19.30.17, MySQL, field defined as boolean, char(1) I think this worked, but haven't used it in some time. -- Resources: - http://web2py.com -

[web2py] SQLFORM.grid information leakage: SESSION instead of GET possible?

2013-10-05 Thread Martin Zach
Hi, the SQLFORM and SQLFORM.grid is very nice, very short code and a quick working result. BUT these grids are showing some internal informations like the id in database_examples/manage_transactions/person/product.seller_id/1 ?_signature=4c5ae928e1c6011a71e52ae341364b5620209908 I can use

[web2py] SQLFORM.grid

2013-09-27 Thread Gael Princivalle
Hi. I want to make a simple SQLFORM.grid test. I have one table. I've tried to make a lot of changes, but it don't works. With this code the ticket is 'str' object has no attribute 'tablename'. Someone can help me ? MY DB: db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])

[web2py] sqlform.grid with div instead of html tables

2013-09-20 Thread ssuresh
Hi, I want to use sqlform.grid and all its features, but do not want the display in a tabular format. Is there a way in which I can change the display of sqlform.grid to my custom div instead of table. I tried doing some formatting on grid.rows mydisplay = myformat(grid.rows)

[web2py] SQLFORM.grid: how can I return to a page after a custom edit function

2013-09-18 Thread tomt
Hi, I'm looking for suggestions or examples on how I can implement a custom edit function for SQLFORM.grid that will remember the page it was called from, and return to it once the editing is complete. I was able to call the custom edit function easily enough by using the 'links' parameter

[web2py] SQLFORM.grid and count field (web2py 2.6.0. test)

2013-09-09 Thread damufo
Hi, I'm using web2py 2.6.0. test. on line sqlhtml 1916 columns = [f for f in fields if f.tablename in tablenames] AttributeError: 'Expression' object has no attribute 'tablename' when field count, count not attribute 'tablename' My code: submenus =

[web2py] SQLFORM.grid - Create from list of objects

2013-09-06 Thread Gliese 581 g
** I am working on a project where we have a different subsystem whose API returns a list of certain type of objects. I want it to be displayed on my form. Can I use SQLForm.grid for this? Please suggest. -- --- You received this message because you are subscribed to the Google Groups

Re: [web2py] sqlform.grid query question

2013-09-05 Thread António Ramos
Going with SQLTABLE i have my rows queried like count1=db.card_logs.id.count() (db.)select(db.trabalhador.nome,db.trabalhador.area,count1,groupby=db.trabalhador.nome, *having =(count1 % 2 = 1)*) the *having* clause is not accepted , how to do it to query only odd counts? I use sqlite!

Re: [web2py] sqlform.grid query question

2013-09-05 Thread António Ramos
Bingo! having =(count1 % 2* *==* *1) 2013/9/5 António Ramos ramstei...@gmail.com Going with SQLTABLE i have my rows queried like count1=db.card_logs.id.count() (db.)select(db.trabalhador.nome,db.trabalhador.area,count1,groupby=db.trabalhador.nome, *having =(count1 % 2 = 1)*)

Re: [web2py] sqlform.grid query question

2013-09-05 Thread Richard Vézina
Good! Richard On Thu, Sep 5, 2013 at 5:55 AM, António Ramos ramstei...@gmail.com wrote: Bingo! having =(count1 % 2* *==* *1) 2013/9/5 António Ramos ramstei...@gmail.com Going with SQLTABLE i have my rows queried like count1=db.card_logs.id.count()

Re: [web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
yes , stat is a string with chech in or check out i also have a timestamp for the check in or check out. I dont want odd /even hours I want to know if the user is checked in I have an RFID app to check in /out outside workers via an rfid tag. when the user checks firstime, the app records

Re: [web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
If the user checks his rfid tag within 5 minutes of the last check the log does not record check in or check out but error 2013/9/4 António Ramos ramstei...@gmail.com yes , stat is a string with chech in or check out i also have a timestamp for the check in or check out. I dont want odd

Re: [web2py] sqlform.grid query question

2013-09-04 Thread Richard Vézina
Don't understand what you need exactly... Is stat a string type containing 'check in' or 'check out' and you want just odd number of record or you have an other field with timestamp or something and you want only the odd hours to appear in the grid?? Richard On Wed, Sep 4, 2013 at 12:54 PM,

[web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
hello i need to use the sqlform.grid(query,etc... to show records *my problem* the query is not just like ((db.tab1.stat='check in')|(db.tab1.stat='check out')) i need to query only records that appear with stat='check in' or 'check out' odd times in tab1 and not even times For example ,

Re: [web2py] sqlform.grid query question

2013-09-04 Thread Richard Vézina
Ok, so you need to check against actual time which person are still in... If you really just want the persons/users that are still in a give time, I think you need a group by over user_id... So you could set a limit of 2 records per user and if you have only one and it is a 'check in' stat value

[web2py] SQLFORM.grid slow with just 12,500 records???

2013-08-23 Thread greenpoise
What could be the culprit??? I have a few left joins but I mean most of them are from auxiliary tables. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] SQLFORM.grid always show column sorter arrows

2013-08-10 Thread Jim S
I have a requirement from a client to ALWAYS show the sorter arrows on the sort column in SQLFORM.grid. Anyone have a good way to turn that on globally? -Jim -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group

Re: [web2py] SQLFORM.grid : formstyle, readable and writable control

2013-07-10 Thread andypaps
Hi There, I am looking for a web2py developer for a medium sized job. Please could you help me?? Anyone. My email is a...@simsend.com Thank you! Andy On Wednesday, 9 November 2011 22:55:25 UTC+2, Richard wrote: Hello, I would like to know I can control generated form with SQLFORM.grid...

[web2py] SQLFORM.grid Feature Request

2013-07-10 Thread greenpoise
Does this request make sense?? Add the functionality to concatenate fields in the grid, like: fields=[db.table.field+db.table.field2,db.table2.field+db.table. field,db.table.field3,...] SQLFORM.grid(query, fields=fields,... ) I got the concatenate working via represent BUT the values do not

[web2py] SQLFORM.grid custom applications

2013-07-03 Thread Kamil
Hello guys, I tried SQLFORM.grid for a while and couldn't figure out if it's possible to do the following: 1) Let's say we have a tables: db.define_table('shop', Field('shop_name'), Field('city_id', 'reference city') ) db.define_table('city', Field('city_name') ) and grid =

[web2py] SQLFORM.grid ondelete

2013-06-28 Thread Kyle Flanagan
I have an SQLFORM.grid w/ an ondelete calling a function customer_delete(). However, the the function is not being called and the records are not actually being deleted from the DB. If I remove the ondelete=customer_delete in my grid args, the records are being deleted. The way I understand

[web2py] sqlform.grid - Accessing id and values from link checkbox

2013-06-21 Thread PremKumar KrishnaKumar
Hi, I am trying out webapp development using web2py and need your direction in finding a solution I use links to display a check-box in sqlform.grid and in the form I have a button. links = [dict(header='Actioned',body=lambda row: INPUT(_name='action',_type='checkbox'))] Once I click the

[web2py] SQLFORM.grid query widget not working

2013-06-17 Thread ewong1111
Hi, I started using web2py on Windows (with IE) but realized that I needed to use Linux (with Firefox). SQLFORM.grids looked very nice on Windows, but now that I am using Linux, they look very plain, and more concerningly, do not seem to be working properly for me. In particular, the query

[web2py] SQLFORM.grid run too many queries from database ...

2013-06-12 Thread David Marko
I have a following table definition in my app. The table contains one filed that references another table called 'category' and then 3 fields that references auth_user table. task_type=db.define_table('scheduled_task_type', Field('category','reference category', label='Kategorie',

[web2py] SQLFORM.grid view

2013-05-30 Thread John Fraser
When storing html in a table, how would one render that html to the SQLFORM.grid view page? . The page the user sees when clicking on the view button in the grid? I am storing HTML in the body field of the db.announcenment. By default it SQLFORM.grid displays tags in the view br,h1, etc...

[web2py] SQLFORM.grid() custom view

2013-05-15 Thread Vlasov Vitaly
Hello all! I need help about SQLFORM.grid I need to represent data from DB in my own way. I choose SQLFORM.grid() for that task. Returned form is displayed as table of lines with fields values. In my app need to specify how every db record will be displayed. How to specify my own widget to

Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
2013/5/12 Ovidio Marinho ovidio...@gmail.com How to replace icons link inside the sqlform.grid??? Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi 83 9336 3782 - Claro

Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
If you like change the icons I recomend rewrite the links with the links parameter of the grid, something like: links = [lambda row: A(TAG[''](SPAN(_class=icon icon-list),SPAN('List', _class=buttontext button, _title=list)), _class=w2p_trap button btn, _href=URL('see_list', args=[row.id])),

[web2py] SQLFORM.grid how to link a entire row?

2013-05-12 Thread Thomas Wimmer
How can i make entire rows clickable in grids? The link should depend on the row.id. Thx in advance! :-) -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] SQLFORM.grid icons

2013-05-12 Thread Ovidio Marinho
How to replace icons link inside the sqlform.grid??? Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi 83 9336 3782 - Claro Brasil -- --- You received this message

[web2py] SQLFORM.grid seems to overwriting an unshown field.

2013-05-03 Thread Tim Richardson
I must have missed something. In 2.4.6 I have a MSSQL table with an integer field. When I show the table with SQLFORM.grid, one of the fields is being reset to 0. The definition of this field is Field(cm_patient_id,integer) The table is migrate =False. the SQLFORM.grid is form =

Re: [web2py] SQLFORM.grid() and Search

2013-05-02 Thread Richard Vézina
Maybe I should update, because with web2py 2.3.2 I can't search a la contains in all the columns... Richard On Wed, May 1, 2013 at 4:47 PM, Cliff Kachinske cjk...@gmail.com wrote: I like the latest search in grid/smartgrid a lot. A very nice piece of work. I do have a tiny concern about

Re: [web2py] SQLFORM.grid() and Search

2013-05-02 Thread Niphlod
uhm, ok. try the trunk version, then post your requirements with examples, and then I'll surely take a look into it, ok ? On Thursday, May 2, 2013 4:46:24 PM UTC+2, Richard wrote: Maybe I should update, because with web2py 2.3.2 I can't search a la contains in all the columns... Richard

Re: [web2py] SQLFORM.grid() and Search

2013-05-02 Thread Richard Vézina
Ok, no improvement on contains like search in trunk... I will try to make a dummy app with table a fields labelled and explain how the search could behave in case someone want to obfuscate the database table and field names... Richard On Thu, May 2, 2013 at 2:16 PM, Niphlod niph...@gmail.com

[web2py] SQLFORM.grid() and Search

2013-05-01 Thread Richard
Hello, I did some research about SQLFORM.grid() Search Question and I summarize what I found here : Search requirements for me to use SQLFROM.grid() in place of Datatables.net : 1. Need to be able to search the representation for referenced fields * (Solved)* 2. No database field

Re: [web2py] SQLFORM.grid() and Search

2013-05-01 Thread Niphlod
uhm.. 2. seems hard but not impossible. However, what do you need specifically ? instead of *auth_user.first_name=hello* just *First name=hello* or *whatever suites me best=Hello*? What if some column names collide ? 3. unless you're referring to custom-coded filters in datatables.net, all

Re: [web2py] SQLFORM.grid() and Search

2013-05-01 Thread Richard Vézina
Wasn't know about your explanation for point 3 (contains() manner), so this one seems to be solved. Will test if we can do, a space that mean b to make sure it search for a b in association in all the columns though... About 2, I agree with you it is a bigger challenge. But I think it could

Re: [web2py] SQLFORM.grid() and Search

2013-05-01 Thread Cliff Kachinske
I like the latest search in grid/smartgrid a lot. A very nice piece of work. I do have a tiny concern about exposing table names to the world at large, though. Maybe it would be possible to obfuscate the table name by presenting the plural of the table. On Wednesday, May 1, 2013 4:23:23

[web2py] SQLFORM.grid search widget omits decimal fields. Any reason for this?

2013-04-08 Thread Cliff Kachinske
Is there any reason why the default search widget does not include decimal field types? In sqlhtml.py v 2.4.2, decimal field types are omitted from the search options dictionary, lines 1619, 1629. Likewise in lines 1637 -1731 there is no value_input defined for decimal field types. Is there

[web2py] SQLFORM.GRID delete not deleting

2013-04-04 Thread António Ramos
I´m having the same problem reported here https://code.google.com/p/web2py/issues/detail?id=1234 my grid mytable = SQLFORM.grid( db.t_docs.f_trab_ref==query , csv=False, searchable=False,

[web2py] SQLForm.grid() + LEFT JOIN + common_filters

2013-03-27 Thread Felipe Meirelles
I'm facing a problem where if I have something like this: grid = SQLFORM.grid(db.table1, left=[db.table2.on(db.table2.id==db.table1.reference)], ) my common filters are not processed for table1, only for table2! including is_active filter for version recording. Is there a bug? --

[web2py] SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Andrii Pitukh
I created the following form: SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1')) The names of columns that are set in headers are shown correctly (I see * Myname1* as header). But when I press view or create, I see '*field1*' as column header instead of *'Myname1'* --

[web2py] SQLFORM.grid/smartgrid: passing different fields to editargs for parent and child

2013-03-26 Thread Shawn Wheatley
I'm trying to edit a different subset of fields when editing records for a parent table and a child table. Looking at the source for SQLFORM, it looks like the dictionary passed to editargs is merged on-demand with the formargs dictionary. This is causing errors for me when editing the child

[web2py] SQLFORM.grid passing a paramter to 'new' function - not authorized

2013-03-20 Thread Jim S
Hi Working with SQLFORM.grid. I'm providing my own 'Add' button because I want to gather some initial values before presenting the user with the .grid 'new' page. So, when you click on my Add button a bootstrap modal window pops up and you then select a 'site'. When I click on Next on my

[web2py] SQLFORM.grid in LOADed component Delete behavior

2013-03-13 Thread Jim S
Hi I have a LOADed component that has a SQLFORM.grid in it. The definition looks like this: grid = SQLFORM.grid(updateQuery, fields=[db.tankSite.name], left=left, create=False, editable=False, details=False, maxtextlength=45, orderby=[db.tankSite.name], csv=False, searchable=False,

[web2py] SQLFORM.grid with default field values from parent SQLFORM and TOTAL for a column

2013-03-13 Thread Jeison Dück
Hello, all, I have those 3 models bellow: db.define_table('order', db.Field('customer', db.customer), db.Field('autor', db.auth_user), db.Field('created', 'datetime'), ) db.define_table('product', db.Field('name'), db.Field('value'), format='%(name)s' )

[web2py] SQLFORM.grid in Components oddity

2013-03-05 Thread Philip Kilner
Hi All, I'm seeing some odd behaviour, and am trying to work out if it's web2py or me that is confused. I have a page with JQueryUI tabs. The first tab shows a record, the 2nd, 3rd and 4th tabs show grids from different child tables, each within a LOADed component. The templates all use the

[web2py] SQLFORM.grid and joins

2013-02-27 Thread sander . vinkesteijn
Good day, We're using web2py and loving it, but we ran into an issue with the sqlform.grid. Quick sketch of my situation: A relatively complex query is build up according to filter settings. This recently included joins to other tables and not just one to many, but many-to-many. Ie there is a

Re: [web2py] SQLFORM.grid custom search where is the error?

2013-02-21 Thread Mandar Vaze
I'm using Version 2.3.2 (2012-12-17 15:03:30) stable and the problem still persists. i.e. I'm still getting Invalid Query error. I'm using Alex's workaround which seems to be working. Thanks Alex. -Mandar On Friday, September 28, 2012 6:07:13 PM UTC+5:30, Massimo Di Pierro wrote: Clearly

[web2py] sqlform.grid does not delete record

2013-01-22 Thread António Ramos
hello my sqlform.grid delete button , deletes the document from the grid but if i refresh the page the document comes back again to the grid. mytable = SQLFORM.grid( db.t_docs.f_trab_ref==request.args(0), csv=False, searchable=False,

[web2py] SQLFORM.grid and the maxtextlength parameter: The parameter doesnt work in my code

2013-01-18 Thread Sverre
I have the controller: def commodities(): tbl = db.commodities fields = [tbl.itemcode,tbl.name,tbl.unit,tbl.supplier,tbl.contact] query = (tbl.id0) order = [tbl.itemcode] maxlen =

Re: [web2py] SQLFORM.grid and the maxtextlength parameter: The parameter doesnt work in my code

2013-01-18 Thread Javier Pepe
Hello maxtextlength is for all fields, you need use maxtextlengths http://web2py.com/book/default/chapter/07#SQLFORM.grid-and-SQLFORM.smartgrid On Fri, Jan 18, 2013 at 9:40 AM, Sverre sverreodeg...@gmail.com wrote: I have the controller: def commodities(): tbl = db.commodities

[web2py] SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-17 Thread Jim S
Is there a way to specify 2 left outer joins for a SQLFORM.grid? I tried this: query = (db.feedLoad.deliverOn==datetime.datetime.today())( db.feedLoad.siteId==1) fields = [db.feedLoad.siteId, db.feedOrderLine.productSiteId, db.feedLoad.deliverOn, db.feedLoad.loadNumber,

[web2py] sqlform.grid exporting with_hidden_cols

2013-01-16 Thread Vincent
I am trying to export a grid with a custom exporter that has a name ending with_hidden_cols in order to export a complete table (and more). However, my exported file does not contain the hidden cols. I have diagnosed the problem and believe the following changes yields the expected behavior:

[web2py] SQLFORM.grid and smartgrid ondelete callbacks and etc.

2013-01-11 Thread Kostas M
I see there are many questions on the workings of *ondelete* and *oncreate*callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but *ondelete* take a form object as input. Searching for answers in: - grid/smartgrid ondelete

[web2py] SQLFORM.grid with reference

2013-01-11 Thread __pyslan__ - Ayslan Jenken
Hello, everyone. I have the following Models: Category = db.define_table('category', Field('categ_id', 'integer', notnull=True, label=T('Category')), Field('name', 'string', notnull=True, label=T('Name')), format=%(name)s ) Reading = db.define_table('reading',

[web2py] SQLFORM.grid callbacks

2013-01-11 Thread Kostas M
I see there are many questions on the workings of ondelete and oncreate callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but ondelete take a form object as input. Searching for answers in web2py-user topics such as: *grid/smartgrid ondelete issue*

<    1   2   3   4   >