[web2py] Re: Executesql SQLFORM.grid

2015-03-26 Thread LaDarrius Stewart
WITH X (CURRENCY_CODE, AR_CONTROL_ACCT, CLIENT_ID, BILL_NUMBER) AS ( SELECT A.CURRENCY_CODE, A.AR_CONTROL_ACCT, A.CLIENT_ID, A.BILL_NUMBER FROM AR_TRANSACTIONS_ALL A WHERE A.SOURCE_AUDIT 0 AND A.TX_POSTED = 'True' AND A.TX_DATE = TIMESTAMP('{0}', '23.59.59')

[web2py] Executesql SQLFORM.grid

2015-03-11 Thread LaDarrius Stewart
Is there anyway to move rows generated from executesql into a grid. With the use of executesql in web2py for complex queries I was surprised not to see this question asked anywhere else that I could find. -- This message is for named person(s) only. It may contain confidential and/or legally

[web2py] GRID selectable inside component

2014-10-15 Thread LaDarrius Stewart
I have a grid inside a component inside a component which has selectable set to run a function that assigns the ids to a session variable. When inside the component it does not work when i click submit I can tell that the page is being reloaded but the callback does not run. I know that the

[web2py] Failed login attempt lockout

2014-09-18 Thread LaDarrius Stewart
Needed a way to lock a user account on three failed attempts. I started off by doing the following... def checkuser(): a = request.vars.username b = db((db.auth_user.username==str(a))).select().first() if b is not None: b.update_record(Attempts=b.Attempts + 1) def

[web2py] Download inside component

2014-06-13 Thread LaDarrius Stewart
Currently have a modal being filled by the following code links=[lambda row: BUTTON('Apply Payment', _onclick=web2py_component('%s', 'modalinfo'); % \ URL('default', 'applypayment2.load', args=row.Inv_Header.id),

[web2py] Re: Problem using multiple grids in single view

2014-06-10 Thread LaDarrius Stewart
Name the grids. grid = SQLFORM.grid(db.table, formname='cadd', formstyle=bootstrap) On Monday, June 9, 2014 3:47:37 AM UTC-5, Sarbjit wrote: I am using two grids in my application but I have observed that when I use Edit/View button for GRID1 and return back (i.e. submit any changes from

[web2py] Re: Problems with multiple forms and SQLFORM.grid

2014-06-04 Thread LaDarrius Stewart
In what function can you show some new code? And yes do a ajax callback to a delete method. ex: onclick=ajax('{{=URL('deletesomething',args=(row.id))}}',[],null) (row.id could be wrong obv) def deletesomething(): db(db.table.id http://db.auth_membership.id/ ==request.args(0)).delete() Is

[web2py] Re: Problems with multiple forms and SQLFORM.grid

2014-06-03 Thread LaDarrius Stewart
1) Use SQLFORM factory. 2) Name your forms example below. (changes in red do this to them all with different names of course) 3) Not sure whats going on can you explain a bit more? form2=FORM('Your name:', INPUT(_name='grupa', _type='text'), INPUT(_type='submit')) if

[web2py] Re: Is it easy to create a grid data entry form using web2py?

2014-06-03 Thread LaDarrius Stewart
Like this? http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript On Tuesday, June 3, 2014 7:25:19 AM UTC-5, c...@isbd.net wrote: This may be trying to run before I can walk but never mind! :-) Is it easy to create a grid type table editing

[web2py] Re: select only one table in a joined select

2014-06-03 Thread LaDarrius Stewart
The join is making that happen. Why not just do *dbTags = db(db.product_tag.product==row.product.id http://row.product.id/).select(db.product_tag.tag)* *Whats the point in the join on a m2m table?* On Tuesday, June 3, 2014 3:54:52 AM UTC-5, Robin Manoli wrote: Hey, I have a

[web2py] Re: Problems with multiple forms and SQLFORM.grid

2014-06-03 Thread LaDarrius Stewart
As far as I could replace it with SQLFORM but then I need to know how to hide user_id field and set it to user.id value What do you mean are you just trying to hide the id value? like this - db.table.id.readable=False ? On Sunday, June 1, 2014 9:10:07 AM UTC-5, john smith wrote: I want to

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
such migration. I assume you are using sqlite which does allow inconsistent data types. Try delete (or move) your database and see if you can reproduce the problem. On Friday, 16 May 2014 16:27:20 UTC-5, LaDarrius Stewart wrote: I deleted previous post stating it was working it's not im tired

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
FYI Inside the new method i added i tried a=int(request.vars.id) to see if I could produce the same list error and it does as well. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
and load it in the ab div. Anthony On Friday, May 16, 2014 4:27:10 PM UTC-4, LaDarrius Stewart wrote: links = [lambda row: BUTTON('Profile',_onclick=jQuery('#id5').val('%s'); ajax('new', ['id'], 'ab'); % str(row.id), **{'_data-toggle': 'collapse', '_data-target' : '#ab', '_class' : 'two btn

[web2py] Re: Component error SQLFORM with record

2014-05-17 Thread LaDarrius Stewart
-toggle btn btn-success', '_data-parent' : '#accordian', '_type' : 'submit', '_value' : 'Submit', '_id' : 'ld'})] On Saturday, May 17, 2014 10:10:08 AM UTC-5, LaDarrius Stewart wrote: Thank you Anthony this is much better greatly appreciated. On Saturday, May 17, 2014 9:27:35 AM UTC-5, Anthony

[web2py] Re: missing pass in view

2014-05-16 Thread LaDarrius Stewart
Can you post the code? On Friday, May 16, 2014 5:01:40 AM UTC-5, Nikunj Agarwal wrote: i am getting an error Missing pass in view although I had written all the {{pass}} statements wherever required in the program(after an if-else block and a for loop)...what could be the possible solution

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
: are you aware that ajax('new' ['id'], 'ab') it takes all input with name = id and pass those as an argument ? On Friday, May 16, 2014 7:27:47 AM UTC+2, LaDarrius Stewart wrote: Im loading a component from a grid with a button you can see the code below in grid links=links. My issue

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
links = [lambda row: BUTTON('Profile',_onclick=jQuery('#id5').val('%s'); ajax('new', ['id'], 'ab'); % str(row.id), **{'_data-toggle': 'collapse', '_data-target' : '#ab', '_class' : 'two btn btn-success', '_type' : 'submit', '_value' : 'Submit', '_id' : 'ld'} )] # Companysearch method grid

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
Omitted quite a bit Anthony but I feel I included the valuable information. Considering minus the record value of the SQLFORM the functionality works as intended. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
I fixed it im not sure why because I thought these two parameters were the same but i changed it from: form3=SQLFORM(db.Company,a,formstyle=bootstrap) To this: form3=SQLFORM(db.Company,record_id=a,formstyle=bootstrap) And its working fine... :( -- Resources: - http://web2py.com -

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
I deleted previous post stating it was working it's not im tired... On Friday, May 16, 2014 3:28:49 PM UTC-5, LaDarrius Stewart wrote: Omitted quite a bit Anthony but I feel I included the valuable information. Considering minus the record value of the SQLFORM the functionality works

[web2py] Component error SQLFORM with record

2014-05-15 Thread LaDarrius Stewart
Im loading a component from a grid with a button you can see the code below in grid links=links. My issue is the first time I press the button everything is fine the pages collapse etc etc the component loads. Then if i press another button from the grid im getting a strange error(Seen below).

Re: [web2py] Re: Reload page on component form submit

2014-05-08 Thread LaDarrius Stewart
---controller-- @auth.requires_login() def test(): a=request.args(0) form=SQLFORM(db.Notes).process() form.vars.TestID = a comments=db(db.Test.TestID==a).select() if form.process(formname=somename).accepted: form.vars.TestID = a

[web2py] grid issues

2014-05-01 Thread LaDarrius Stewart
def qadata(): form2=FORM(LABEL(,INPUT(_type=text,_name=lastname,requires=IS_LENGTH(minsize=3), _placeholder=Company Name, _size=35, _style=font-size:15px)), BUTTON(Submit, _type=submit,_value=Submit, _data={'loading-text':'loading'})) grid=None

[web2py] Upload file functionality

2014-01-16 Thread LaDarrius Stewart
I thought I was on the correct path with this can soemone tell me where this is going wrong? db.define_table('consumer', Field http://127.0.0.1:8000/examples/global/vars/Field('lname','string', requires=IS_NOT_EMPTY http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY()),

[web2py] Re: Upload file functionality

2014-01-16 Thread LaDarrius Stewart
Looking at my custom retrieve file shouldnt the path be looking in here path = applications/facesheet/uploads On Thursday, January 16, 2014 10:25:21 AM UTC-6, LaDarrius Stewart wrote: I thought I was on the correct path with this can soemone tell me where this is going wrong

[web2py] Re: Upload file functionality

2014-01-16 Thread LaDarrius Stewart
? On Thursday, January 16, 2014 10:25:21 AM UTC-6, LaDarrius Stewart wrote: I thought I was on the correct path with this can soemone tell me where this is going wrong? db.define_table('consumer', Field http://127.0.0.1:8000/examples/global/vars/Field('lname','string', requires

[web2py] Re: SQLForm Grid

2013-12-15 Thread LaDarrius Stewart
Nah that still brings back the entire set of records On Friday, December 13, 2013 10:38:03 AM UTC-6, LaDarrius Stewart wrote: Is there to only give the add(create) functionality of the sqlform.grid Example: db.define_table('Participant', Field('FirstName' , 'text'), Field('LastName

[web2py] SQLForm Grid

2013-12-13 Thread LaDarrius Stewart
Is there to only give the add(create) functionality of the sqlform.grid Example: db.define_table('Participant', Field('FirstName' , 'text'), Field('LastName' , 'text') fields = [ db.Participant.FirstName ] headers = {'Participant.FirstName': 'FirstName'}

[web2py] Re: SQLForm Grid

2013-12-13 Thread LaDarrius Stewart
= SQLFORM.widgets.autocomplete(request, db.Locals.LocalName, id_field=allowed) On Friday, December 13, 2013 10:38:03 AM UTC-6, LaDarrius Stewart wrote: Is there to only give the add(create) functionality of the sqlform.grid Example: db.define_table('Participant', Field('FirstName' , 'text

[web2py] Re: update_record losing my mind

2013-12-12 Thread LaDarrius Stewart
Thanks Niphold and Anthony taking away the id field inside the table definition brought update_record back to life :) Love the fast responses you guys give in this group. :D On Wednesday, December 11, 2013 4:01:44 PM UTC-6, LaDarrius Stewart wrote: db.define_table('Participant', Field

[web2py] update_record losing my mind

2013-12-11 Thread LaDarrius Stewart
db.define_table('Participant', Field('Id' , 'integer'), Field('FirstName' , 'text'), Field('LastName' , 'text'), Field('CardNumber' , 'text'),db.define_table('Participant', Field('Id' , 'integer'), Field('FirstName' , 'text'), Field('LastName' , 'text'),

[web2py] Re: update_record losing my mind

2013-12-11 Thread LaDarrius Stewart
. On Wednesday, December 11, 2013 4:01:44 PM UTC-6, LaDarrius Stewart wrote: db.define_table('Participant', Field('Id' , 'integer'), Field('FirstName' , 'text'), Field('LastName' , 'text'), Field('CardNumber' , 'text'),db.define_table('Participant', Field('Id' , 'integer

[web2py] Page not saving info SQLFORM.grid

2013-11-02 Thread LaDarrius Stewart
def index(): form=FORM(TABLE(TR(Last Name:,INPUT(_type=text,_name=lname,requires=IS_LENGTH(minsize=3))), TR(,INPUT(_type=submit,_value=SUBMIT message = grid = None fields = [db.Member.FIRST_NAME, db.Member.LAST_NAME]

[web2py] Re: Page not saving info SQLFORM.grid

2013-11-02 Thread LaDarrius Stewart
No one have any idea? On Friday, November 1, 2013 4:03:49 PM UTC-5, LaDarrius Stewart wrote: def index(): form=FORM(TABLE(TR(Last Name:,INPUT(_type=text,_name=lname,requires=IS_LENGTH(minsize=3))), TR(,INPUT(_type=submit,_value=SUBMIT message = grid