[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-users topics such as: - *grid/smartgrid ondelete

[web2py] SQLFORM.grid ondelete and other callbacks

2013-01-11 Thread Kostas M
(This is the 3rd time I am trying to post this question. For some reason the message was deleted. Is using links in the message considered harmful?) 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

[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-users topics: - *grid/smartgrid ondelete issue*

[web2py] SQLFORM.grid Error, changes from 2.2.1 to 2.3.1 - 2.3.2

2013-01-04 Thread Christian Espinoza
Hi, In all my webapps I'm working with SQLFORM.grid, and testing with the new versions I got this error: type 'exceptions.TypeError' must be string, not listVERSIÓNweb2py™(2, 3, 2, datetime.datetime(2012, 12, 17, 15, 3, 30), 'stable')PythonPython 2.7.3: C:\Python27\python.exeTRACEBACK 1. 2.

Re: [web2py] SQLFORM.grid

2012-12-18 Thread Johann Spies
On 13 December 2012 23:08, Drew drew.simpson.h...@gmail.com wrote: Greetings, I'd like to use the sql 'distinct' in a SQLFORM.grid 'query', but it is only valid as parameter in the 'select' method. I guess the 'group' parameter to SQLFORM.grid would work, but then I have to build the

[web2py] SQLFORM.grid

2012-12-14 Thread Drew
Greetings, I'd like to use the sql 'distinct' in a SQLFORM.grid 'query', but it is only valid as parameter in the 'select' method. I guess the 'group' parameter to SQLFORM.grid would work, but then I have to build the columns to group by, which seems excessive. Is it possible to create or pass

[web2py] SQLFORM.grid and classes on GAE

2012-11-29 Thread Gian Luca Decurtins
Hi all Given the following model (polymodel location - location_outdoor location_indoor) on GAE: define_table('location', Field('name', 'string'), Field('active', 'boolean'), polymodel = True) define_table('location_outdoor', db.location, Field('country', 'string'),

[web2py] SQLFORM.grid joins and view/edit

2012-11-28 Thread Michael Hall
I have a SQLFORM.grid with a join, however when I insert, edit or update a record displayed in the grid I am only ever given a form for the parent table. What is the preferred method for creating insert, update and delete forms for a joined SQLFORM.grid? Common sense tells me that it is the

[web2py] SQLFORM.grid + Linked page with SQLFORM.grid

2012-11-20 Thread vivek
Hi , I have a grid , with links to pages which has another grid. constraints = {'db.lead':qcomm} form = SQLFORM.smartgrid(db.lead,constraints = constraints,deletable= False,details=False, links = [lambda row: A(SPAN(_class='icol-comment'), _href=URL(lead,comm,args=[row.id])),lambda

[web2py] SQLFORM.grid in LOAD

2012-11-20 Thread vivek
https://lh4.googleusercontent.com/-Wk4LfMakiVg/UKt_Z_gNxFI/ABc/UxjmHhF-t1A/s1600/nestedloads.jpg Hi , I have a grid as a LOAD component , everything works fine , except for delete. If i was to click on delete , and then cancel it (delete button in grid) , the URL is reloaded

Re: [web2py] SQLFORM.grid + Linked page with SQLFORM.grid

2012-11-20 Thread Johann Spies
On 20 November 2012 13:05, vivek vi...@digambernath.org wrote: Hi , I have a grid , with links to pages which has another grid. constraints = {'db.lead':qcomm} form = SQLFORM.smartgrid(db.lead,constraints = constraints,deletable= False,details=False, links = [lambda row:

Re: [web2py] SQLFORM.grid in LOAD

2012-11-20 Thread Johann Spies
On 20 November 2012 15:02, vivek vi...@digambernath.org wrote:https://lh4.googleusercontent.com/-Wk4LfMakiVg/UKt_Z_gNxFI/ABc/UxjmHhF-t1A/s1600/nestedloads.jpg Hi , I have a grid as a LOAD component , everything works fine , except for delete. If i was to click on delete , and

Re: [web2py] SQLFORM.grid + Linked page with SQLFORM.grid

2012-11-20 Thread vivek
Hi, Nope that didnt work, the result is the same On Tuesday, November 20, 2012 6:10:25 PM UTC+4, Johann Spies wrote: On 20 November 2012 13:05, vivek vi...@digambernath.org javascript:wrote: Hi , I have a grid , with links to pages which has another grid. constraints =

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-12 Thread Niphlod
With the jids= notation the current grid won't have any functional pagination,ordering, export, etc. That's because vars are not propagated. I sent a patch to Massimo for that a few days ago. The question still stands: without using jids= and using only keywords= styled urls when you click on

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-12 Thread Johann Spies
On 12 November 2012 11:13, Niphlod niph...@gmail.com wrote: With the jids= notation the current grid won't have any functional pagination,ordering, export, etc. That's because vars are not propagated. I sent a patch to Massimo for that a few days ago. Thanks. I have used session variables to

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 7 November 2012 17:38, Niphlod niph...@gmail.com wrote: patch to apply to trunk. Please test it extensively with all the possible combinations. I applied the patch but did not see any different behaviour. A view with two records in the grid exported the whole table of more than 1

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
what is the url you exported from ? (i.e. hover on the export link and paste here (the relevant part is from the controller onwards)) On Thursday, November 8, 2012 11:08:11 AM UTC+1, Johann Spies wrote: On 7 November 2012 17:38, Niphlod nip...@gmail.com javascript: wrote: patch to apply to

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 8 November 2012 15:32, Niphlod niph...@gmail.com wrote: ehm missing something here. jids is not a standard var for the grid, are you using that var to filter the query passed to the grid ? One thing is taking care of the default filtering (keywords variable), another is to accomplish

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
ok, give me some hints at least (trying to reverse engineer here :P). when you go to http://localhost:8000/init/journal/journals how many records are returned ? I assume 1. in other words: are you using request.vars.jids to create the query you pass on the tables ? If yes, I remember

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
uhm, good point on if you want the entire table, just remove the filters. how to handle something that is impossible to handle (export a table with so many rows that you can't export without timeouts or consuming memory). just timeout ? On Wednesday, November 7, 2012 2:17:02 AM UTC+1,

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
woking on 1. for 2, how do you foresee how much time and RAM the present query will take to be serialized ? On Wednesday, November 7, 2012 11:25:29 AM UTC+1, Johann Spies wrote: On 7 November 2012 10:56, Niphlod nip...@gmail.com javascript: wrote: uhm, good point on if you want the entire

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
far too magic to check for something that basically isn't trustable: even if you code something like that and you check that there's x mb available, another user can ask for another huge set of data and your previoulsy free RAM is not free anymore. On Wednesday, November 7, 2012 11:59:18 AM

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
if your set doesn't fit into memory, saving it to a temp file won't get you out of troubles. One of DAL problems is that a Rows object does not return an iterator from the cursor, it's fetched all into memory first. On Wednesday, November 7, 2012 12:45:46 PM UTC+1, Johann Spies wrote: On 7

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Johann Spies
On 7 November 2012 14:05, Niphlod niph...@gmail.com wrote: if your set doesn't fit into memory, saving it to a temp file won't get you out of troubles. One of DAL problems is that a Rows object does not return an iterator from the cursor, it's fetched all into memory first. In that case I

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Johann Spies
On 7 November 2012 15:01, Johann Spies johann.sp...@gmail.com wrote: In that case I would be inclined to use bypass DAL and db.executesql and use the backend to export to a file. That should be more efficient. Sorry. That should read ... inclined to bypass DAL and use db.executesql ... --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
at that point you miss formatting fields and references. In addition, db.executesql() doesn't return an iterator either. You should code your own exporter using db._adapter.execute() and a yielding fetchone()s. On Wednesday, November 7, 2012 2:01:45 PM UTC+1, Johann Spies wrote: On 7 November

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
patch to apply to trunk. Please test it extensively with all the possible combinations. On Wednesday, November 7, 2012 2:23:35 PM UTC+1, Niphlod wrote: at that point you miss formatting fields and references. In addition, db.executesql() doesn't return an iterator either. You should code

[web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Aurelijus Useckas
I want to export a certain query in SQLFORM.grid to a CSV, but once I press on the (any) export option bellow the SQLFORM.grid, it exports the whole table and not just the ones meeting the certain criteria. Any ideas? --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Johann Spies
On 6 November 2012 12:50, Aurelijus Useckas aurelijus.usec...@gmail.comwrote: I want to export a certain query in SQLFORM.grid to a CSV, but once I press on the (any) export option bellow the SQLFORM.grid, it exports the whole table and not just the ones meeting the certain criteria. This

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Aurelijus Useckas
OK On Tuesday, November 6, 2012 3:35:10 PM UTC+2, Johann Spies wrote: On 6 November 2012 12:50, Aurelijus Useckas aureliju...@gmail.comjavascript: wrote: I want to export a certain query in SQLFORM.grid to a CSV, but once I press on the (any) export option bellow the SQLFORM.grid, it

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Niphlod
one sec. export is meant to give the user the full resultset he can access (let's say, offline consultation). Currently, only the with hidden cols exports honour the current query. Before calling it a bug we should agree on what functionalities expose on the grid . Il giorno martedì 6 novembre

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Johann Spies
On 6 November 2012 15:57, Niphlod niph...@gmail.com wrote: one sec. export is meant to give the user the full resultset he can access (let's say, offline consultation). Currently, only the with hidden cols exports honour the current query. Before calling it a bug we should agree on what

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Aurelijus
I would personally expect the export to give the representation only of the fields I've made a query for. On Tue, Nov 6, 2012 at 4:10 PM, Johann Spies johann.sp...@gmail.com wrote: On 6 November 2012 15:57, Niphlod niph...@gmail.com wrote: one sec. export is meant to give the user the full

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Niphlod
to me instead it's useful to let them download the whole table are we saying we should support 6*2 = 12 formats (current 6, with filters and without filters) ? How would you name them ? --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Cliff Kachinske
I think it depends on how many records are in the table. If you get a couple million rows, that's quite a load for a spread sheet to import. On Tuesday, November 6, 2012 9:24:26 AM UTC-5, Niphlod wrote: to me instead it's useful to let them download the whole table are we saying we

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Bill Thayer
FWIW, My users will be filtering test station settings to upload the csv to thier test bench software. My users will need only thier own filtered data in the CSVso big Me Too! here --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread howesc
i agree that i expected the export buttons to export what is shown above. if you want to export the whole table, remove all filters so that the whole table is shown above and then click export. (note that i do expect export to export all the rows that match the query even if the table above

[web2py] SQLFORM.grid(db.mydb, fields=['name', 'info'] generate error type 'exceptions.AttributeError' 'str

2012-10-27 Thread Emilius Omeen
hello when use in controller default.py def sql_form(): sqlform=SQLFORM.grid(db.mydb, fields=['name','info']) return dict(sqlform=sqlform) generate ERROR ticket type 'exceptions.AttributeError' 'str' object has no attribute '_tablename' web2py™ (2, 0, 6, datetime.datetime(2012, 9, 2, 4,

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-25 Thread Niphlod
a) you can have the search form to do a get instead of a post. In that way when the user presses the button submit he is redirected to your page, and that page can load the grid with the parameters specified into request.vars b) with this you are sure that the parameters are reset if the user

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread lyn2py
When/where should I clean these variables from session ? In case user directly accesses second URL (without going thru first URL to select the search criteria) they might see incorrect results - since controller function will use old values I suggest to ensure that URLs must be

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Niphlod
isn't this a little silly ? we have an args parameter to the grid but not a vars one Could you try to test a little mod to the source. - open gluon/sqlhtml.py and scroll until def grid( - add a vars={} default parameter - a few line below, there's def url(**b) - change with this

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
Even if we were to add ability in grid to take vars as params - it may not be useful in my case (I think) because when controller is invoked for view/search/pagination, original request.vars are lost (that is why saving in session is needed) -Mandar On Wed, Oct 24, 2012 at 3:26 PM, Niphlod

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
On Wed, Oct 24, 2012 at 12:10 PM, lyn2py lyn...@gmail.com wrote: When/where should I clean these variables from session ? In case user directly accesses second URL (without going thru first URL to select the search criteria) they might see incorrect results - since controller function will

[web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread Mandar Vaze
Hi, I recently added a new SQLFORM.grid which is created based on parameters selected in previous controller function. The query used is based on the request.vars passed from previous controller. I can see the grid alright. (Something like this

[web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread lyn2py
I ran into a similar requirement recently. I used sessions to record the vars I needed. However I can do so because the user is required to click on links to move around the site (they can't guess the urls). That way I can control the variables stored on session. I didn't understand your

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread Mandar Vaze / मंदार वझे
lyn2py : Thanks. Your suggestion worked (you correctly understood the requirement) This thread elsewhere also suggested (indirectly) using the sessions. ( https://groups.google.com/forum/?fromgroups=#!searchin/web2py/sqlform$20with$20args/web2py/GC0EKaQ8Jjo/_tqgCZbctXkJ ) I was thinking in the

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread lyn2py
In my case I was setting over the same session var, and each time checking the same var. --

[web2py] SQLFORM.grid / appadmin: self-reference question

2012-10-22 Thread lyn2py
I have a table that self-references: db.define_table('tags', Field('tag', 'string',length=255,requires=IS_NOT_EMPTY()), Field('description','text'), Field('parent_tags', 'list:reference tags'), format='%(tag)s' ) And in appdamin and SQLFORM.grid, I noticed that there is a + sign

Re: [web2py] SQLFORM.grid / appadmin: self-reference question

2012-10-22 Thread Richard Vézina
It is a feature of list:reference... It may be broken for self-referenced table. There was an issue with self-reference in the pass, don't know if it get fixed or not. You may have a look to pending issue on google code. Richard On Mon, Oct 22, 2012 at 11:08 AM, lyn2py lyn...@gmail.com wrote:

Re: [web2py] SQLFORM.grid / appadmin: self-reference question

2012-10-22 Thread lyn2py
Thanks Richard! On Monday, October 22, 2012 11:41:11 PM UTC+8, Richard wrote: It is a feature of list:reference... It may be broken for self-referenced table. There was an issue with self-reference in the pass, don't know if it get fixed or not. You may have a look to pending issue on

[web2py] SQLFORM.grid search field

2012-10-20 Thread Tito Garrido
Since start with, contains is not translatable should we give it as an option? Is there a way to leave just the first search field and hide the other options? Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ --

[web2py] SQLFORM.grid export missing computed fields

2012-10-19 Thread k0aun9
Hi Guys, I have a grid with two more columns with computed fields using below implementation - links = [{'header':'column1','body':lambda row: function1(row.id)}] It displays as I expected, but when I tried to export to csv (csv=True parameter is set) that column is missing. Am I missing

[web2py] SQLFORM.grid 2.1.1 backward compatibility issue

2012-10-18 Thread weheh
I have a datetime field I want to represent differently using a lambda function. Instead of datetime, I want a timedelta. This was not a problem with version 1.99.x but is a problem with 2.1.1 because grid tries to do a row.year, which throws this ticket: Traceback (most recent call last):

[web2py] SQLFORM.grid createargs

2012-10-09 Thread villas
I would like to customize the default Add form. For example I would like to pass some CSS or JS code. I see that there are now createargs, but cannot see how createargs are exposed in the Add form. Might the createargs be useful to me for this purpose? If so, how do they work? If not,

[web2py] SQLFORM.grid dinamically update fields

2012-10-03 Thread alex
I have a SQLFORM.grid. When the user updates field 'a' in the grid, before submitting the form, field 'b' should represent a calculation based on value of 'a'. For instance b=a+1 db.py db.define_table('t', Field('a', type='integer'), Field('b', type='integer') ) default.py def

Re: [web2py] SQLFORM.grid dinamically update fields

2012-10-03 Thread Javier Pepe
chech this http://web2py.com/books/default/chapter/29/07?search=onupdate may help. On Wed, Oct 3, 2012 at 9:49 PM, alex a22...@gmail.com wrote: I have a SQLFORM.grid. When the user updates field 'a' in the grid, before submitting the form, field 'b' should represent a calculation based

[web2py] SQLFORM.grid + GAE

2012-09-30 Thread David Sorrentino
Hi there! :) I'm trying to exploit the power of SQLFORM.grid with GAE but I'm having some troubles. All I want to do is to have a grid from a table (seems to be simple reading the infinite examples on the web). Here my table definition: db.define_table('news', Field('title'),

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

2012-09-28 Thread alex
Thank you Johann, of course I did already, The query itself gets translated correctly. I think that something very subtle is happening when I pass search_widget= search_form, and I cannot catch it I uploaded herehttps://www.dropbox.com/s/d5t13fejdqlr7r4/web2py.app.test.w2pthe packed version

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

2012-09-28 Thread Massimo Di Pierro
Clearly something is wrong I will try this today. Before I do, could you check the latest trunk? On Friday, 28 September 2012 04:36:26 UTC-5, alex wrote: Thank you Johann, of course I did already, The query itself gets translated correctly. I think that something very subtle is happening

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

2012-09-28 Thread alex
Thank you Massimo, I have just tried with web2py-web2py-af258c3, latest trunk, and the situation didn't changed. On Friday, September 28, 2012 9:37:13 PM UTC+9, Massimo Di Pierro wrote: Clearly something is wrong I will try this today. Before I do, could you check the latest trunk? On

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

2012-09-27 Thread alex
I have this table db.define_table('t', Field('a', type='string'), Field('b', type='string'), ) db.t.insert(a='US', b='Washington') db.t.insert(a='US', b='Rochester') db.t.insert(a='US', b='Los Angeles') db.t.insert(a='US', b='Minneapolis') Now I want to search the items in a grid

Re: [web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-20 Thread Mandar Vaze / मंदार वझे
Johann, 2. I also get Submit Query button below the table. I've managed to rename this to Delete Selected - Is there a way to show a confirmation dialog like Are you sure you want to delete all the selected entries (or some such) - before the records are deleted ? I use this:

[web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-18 Thread Mandar Vaze
Hi, I'm using selectable=True in the sqlform.grid. This shows a checkbox in first column for all the rows except the header 1. Is there a way to show the checkbox in the header itself, which when selected selects ALL the rows currently displayed ? I think there is a plugin for this bug that

Re: [web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-18 Thread Johann Spies
On 18 September 2012 12:50, Mandar Vaze mandarv...@gmail.com wrote: Hi, I'm using selectable=True in the sqlform.grid. This shows a checkbox in first column for all the rows except the header 2. I also get Submit Query button below the table. I've managed to rename this to Delete Selected

Re: [web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-18 Thread Massimo Di Pierro
http://web2py.com/books/default/search/29?search=FORM.confirm On Tuesday, 18 September 2012 07:10:42 UTC-5, Johann Spies wrote: On 18 September 2012 12:50, Mandar Vaze manda...@gmail.com javascript:wrote: Hi, I'm using selectable=True in the sqlform.grid. This shows a checkbox in first

[web2py] SQLFORM.grid with args: customizing the Add form

2012-09-11 Thread Vincent
I'm using SQLFORM.grid a lot and it is extremely valuable. I am in a position where I want to use request.args with a grid and I am unsure what the right approach is. Let's say my db.py model is: db.define_table('person', Field('firstname'), Field('lastname'),

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread MichaelF
I appreciate that web2py has ways to handle this, and I also agree that it's somewhat hackish. The problem remains, though, that we're still exposing (publishing) internal primary keys to the browser. Isn't the main problem the fact that we're dealing with primary key values being sent to the

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
I strongly disagree with this. Publishing record IDs does not imply indirect object reference vulnerability. Any application that publishes record information must have a way to reference individual records. If the individual access is not validated than the app is vulnerable to indirect

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread MichaelF
Thanks, Massimo. Re. needing a way to reference individual records: of course. But it doesn't have to be the internal record id (primary key value). The php code we used gave out unique-per-request values so that one couldn't, say, use a key retrieved from one form in another form. The @auth

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
In some sense the grid does what you say. For example: @auth.requires_login() def index(): db.define_table('thing',Field('name'),auth.signature) grid = SQLFORM.grid(db.thing.created_by==auth.user_id) return locals() Notice all the URLs linked by the grid are digitally signed.

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Kevin Cackler
I guess I need to look into the auth.signature functionality. We already had our grid conditional be db.pages.stores_id=STORE_INFO.id but we were able to edit Store 1's page while logged into Store 2's administration area, just by changing the ID in the URL. Are you saying that

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
I only talk for 2.0.x. Yes. That is prevented with the default user_signature=True. If you disable user signature with user_signature=False than you expose yourself to major security risks and may expose the entire database. user_signature = False should only be used for testing or if you

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
I should add that if user_signature=False the tables are always exposed in readonly mode: SQLFORM.grid(..,editable=False, create=False, deletable=False) On Friday, 7 September 2012 14:50:56 UTC-5, Massimo Di Pierro wrote: I only talk for 2.0.x. Yes. That is prevented with the default

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread MichaelF
Ahhh; thanks for pointing that out. I had breezed over the mention about digitally signed (my fault). Makes sense. I'll have to think about the public db keys. Using them through web2py seems to be handled, though. Thanks again. Michael On Friday, September 7, 2012 1:39:47 PM UTC-6, Massimo

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
Anyway, thank you for brining out security issues. It is very important for web2py. The more people look at it from the security point of view, the better. On Friday, 7 September 2012 15:33:11 UTC-5, MichaelF wrote: Ahhh; thanks for pointing that out. I had breezed over the mention about

Re: [web2py] sqlform.grid and query conditions

2012-09-06 Thread Anthony
How about http://web2py.com/books/default/chapter/29/06#Common-filters or http://web2py.com/books/default/chapter/29/06#Common-fields-and-multi-tenancy ? Anthony On Wednesday, September 5, 2012 8:48:49 PM UTC-4, Kevin C wrote: We did something similar but it feels very hackish, considering

[web2py] sqlform.grid and query conditions

2012-09-05 Thread Kevin C
Basically, we are generating a SQLFORM.grid with the following code: db.pages.stores_id.default = STORE_DETAILS.id query = ((db.pages.stores_id == STORE_DETAILS.id)) form = SQLFORM.grid(query=query) return dict(form=form) This is working perfectly fine for us. However, we have

Re: [web2py] sqlform.grid and query conditions

2012-09-05 Thread Bruno Rocha
You can do: if request.args(0) in ['edit', 'delete']: STORE_DETAILS.id == int(request.args(2)) or redirect(URL('default', 'wherever')) db.pages.stores_id.default = STORE_DETAILS.id query = ((db.pages.stores_id == STORE_DETAILS.id)) form = SQLFORM.grid(query=query)

Re: [web2py] sqlform.grid and query conditions

2012-09-05 Thread Kevin Cackler
We did something similar but it feels very hackish, considering it has to be done in every method of the admin controller. I just wanted to see if there was a better way. Thank you. Kevin Cackler Tech Daddies 501-205-1512 http://www.techdaddies.com On 9/5/2012 7:45 PM, Bruno Rocha wrote:

[web2py] SQLFORM.grid CSS help

2012-09-03 Thread Massimo Di Pierro
Right now the gird console (defined in sqlhtml.py) looks like [add] [input ] [search] [clear] [hidden popup] (records found ...) but some times it shows up as [add] [input ...] [search] [clear] [hidden popup] (records found ...) I would like it to

[web2py] SQLFORM.grid and export; some proposals

2012-09-02 Thread Martin Weissenboeck
I want to use the export-feature of SQLFORM.grid. There are some proposals and questions: --- (1) Using the parameter *csv=False* or *csv=True* I can only choose no exports or all export formats. But

[web2py] SQLFORM.grid redirects and access

2012-08-25 Thread lyn2py
I have 2 SQLFORM.grids, they are: ##MODELS db.define_table('company', #each staff can only see the customers under their account Field('company_name', 'string',length=255,requires=IS_NOT_EMPTY()), Field('description','text'), format='%(company_name)s' ) db.define_table('employees',

[web2py] SQLFORM.grid: export csv/tsv, but only without hidden fields

2012-08-12 Thread Martin Weissenboeck
Hi, nice feature to select cvs, htm, tcs when exporting from sqlform.grid. But how to turn off the options csv (hidden fields) and tsv (hidden fields) - I do not want my users to see all hidden fields. Regards, Martin --

[web2py] SQLFORM.grid, checkboxes and mor than one page

2012-08-08 Thread Martin Weissenboeck
I have a SQLFORM.grid for 100 persons. Checkboxes are activated with a function for the selectable-field. Now this long list breaks down to serveral pages. But a check on page 1 gets lost on changing to another page. So it is not possible to select persons from the whole list. Yes, with the

Re: [web2py] SQLForm.grid custom details page

2012-07-30 Thread Johann Spies
On 30 July 2012 05:13, SeamusSeamus morrisjamespatr...@gmail.com wrote: I only want the title, price, photo, description and maybe date to show in the details.html, and not ALL of the fields in the DB (contains private information) In your function 'details' set the fields that you do now

[web2py] SQLForm.grid custom details page

2012-07-29 Thread SeamusSeamus
Hi, I am creating a basic app that allows users to view item in an inventory. They are able to see the item list by using the sqlform.grid. Because some fields in the database are private and I do not want the viewer to see it, I am unable to use the default details page. Because of this, I

[web2py] SQLFORM.grid pagination refresh

2012-07-22 Thread dave
Is there a way for SQLFRORM.grid pagination to not refresh the whole page without the use of LOAD function? --

[web2py] SQLFORM.grid id representation bug?

2012-07-09 Thread Remco K
Hi everyone, I'm working with SQLFORM.grid but I cant get the referenced table representation to work. The only thing i get is the ID of the referenced table(s): *db.py: * db.define_table('clients', Field('number'), Field('name') )

Re: [web2py] sqlform.grid properties

2012-07-05 Thread Johann Spies
On 4 July 2012 16:22, Ovidio Marinho ovidio...@gmail.com wrote: I'm need Translate Bottom submit in SQLFORM.grid, Nao estou achando esta propriedade. Somebody else on this list helped me and I used this code to change the text in that submit button: form.element('.web2py_table

[web2py] sqlform.grid properties

2012-07-04 Thread Ovidio Marinho
I'm need Translate Bottom submit in SQLFORM.grid, Nao estou achando esta propriedade. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi

Re: [web2py] SQLFORM.grid with links in columns

2012-06-14 Thread Johann Spies
On 13 June 2012 20:35, Cornelius Kölbel cornelius.koel...@lsexperts.dewrote: Hi there, I think I found a missing feature and thus got a feature request for the sqlform.grid und thus for the sqlform. I tried to take a look into the code and I think it is not possible. I am using version

[web2py] SQLFORM.grid with links in columns

2012-06-13 Thread Cornelius Kölbel
Hi there, I think I found a missing feature and thus got a feature request for the sqlform.grid und thus for the sqlform. I tried to take a look into the code and I think it is not possible. I am using version 1.99.7. I'd like to a a link to any abitrary column. Let's say I got a table | head1

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-11 Thread Johann Spies
On 8 June 2012 16:31, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please open a ticket about this. This change is a line but put presents logical problems. The user can interact with a gird in ways it cannot interact with sqltable. groupby is the only missing option because it is

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-08 Thread Johann Spies
On 7 June 2012 19:20, Doug Philips douglas.phil...@gmail.com wrote: SQLFORM.grid has saved me a ton of work, but there are few things I wish it did slightly better. I would like to add a request for the possibility to use 'groupby' and all the other options available to db(query).select()

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-08 Thread Massimo Di Pierro
Please open a ticket about this. This change is a line but put presents logical problems. The user can interact with a gird in ways it cannot interact with sqltable. groupby is the only missing option because it is delicate. the user interaction may break it. On Friday, 8 June 2012 03:07:02

[web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Doug Philips
I know that SQLFORM.grid is marked experimental and thus I shouldn't expect it to be as refined as some of the other parts of web2py, but I'm hoping that also means it is still a bit open to adjustment? SQLFORM.grid has saved me a ton of work, but there are few things I wish it did slightly

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Richard Vézina
I am almost sure I saw a email were Massimo explain how to set a different text for submit button, can't find it back... Have you try with SQLFORM attribute ? Or SQLFORM attribute with _ before : _submit_button = 'Submit' Richard On Thu, Jun 7, 2012 at 1:20 PM, Doug Philips

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Doug Philips
On 6/7/12, Richard Vézina ml.richard.vez...@gmail.com wrote: I am almost sure I saw a email were Massimo explain how to set a different text for submit button, can't find it back... Have you try with SQLFORM attribute ? Or SQLFORM attribute with _ before : _submit_button = 'Submit' Well, I

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Richard Vézina
Do you have the latest trunk? Because, web2py change rapidly... Richard On Thu, Jun 7, 2012 at 2:02 PM, Doug Philips douglas.phil...@gmail.comwrote: On 6/7/12, Richard Vézina ml.richard.vez...@gmail.com wrote: I am almost sure I saw a email were Massimo explain how to set a different

Re: [web2py] SQLFORM.grid - questions/suggestions

2012-06-07 Thread Anthony
I'm not sure if this is in stable, but in trunk you can specify dictionaries of args to pass to SQLFORM, including separate dictionaries for create, edit, and view forms: http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#1500. Anthony On Thursday, June 7, 2012 2:02:34 PM UTC-4,

<    1   2   3   4   >