I do not use form.accepts as it goes to different controller/function..
here is code for /{{=request.application}}/extraction/index :
def index():
response.files.append( URL( r = request, c = 'static/css/smoothness',
f = 'jquery-ui.css' ) )
response.files.append( URL( r = request, c = 'static/src', f =
'grid.loader.js' ) )
response.files.append( URL( r = request, c = 'static/css', f =
'ui.jqgrid.css' ) )
response.files.append( URL( r = request, c = 'static', f =
'jquery-ui.js' ) )
SESSION.extracted=False
if REQUEST.vars.extracted_path:
print REQUEST.vars.extracted_path
now=str(datetime.datetime.now()).replace("
","_").replace(":",'-')
extracted_path=os.path.join(REQUEST.vars.extracted_path,now)
On 12/2/10, mdipierro <[email protected]> wrote:
> Not sure what the problem is. Can you try replace?
>
> form.accepts(request.vars,...) with
> form.accepts(request.post_vars,...)
>
>
>
> On Dec 1, 10:23 pm, Phyo Arkar <[email protected]> wrote:
>> I use html forms, that code was since 1.7x and today i get
>> complains from customer (a month after updated to 1.88)
>>
>> Now i found out why:
>> If there is two html forms (non web2py-generated) with different ID,
>> different action but if they have same post vars (or get var i am not
>> tested..) , it recieved at controller as LISTS..
>>
>> I have not tested in lastest version , because i dont dare to update
>> as i dont know what will happen.
>>
>> Thats why i had called for a stable release once in a while few months
>> ago..
>>
>> <form action="/{{=request.application}}/extraction/index"
>> method="post" id = "frmCaselst">
>> <input type="submit" id="extSel" value="Begin Exctraction for
>> Selected Case"> </input>
>> <input type="hidden" id = "db_id" name="db_id" value="" />
>> <input type="hidden" id = "db_name" name="db_name"
>> value="{{=request.vars.dbName}}" />
>> <input type="hidden" id = "source_path" name="source_path"
>> value="{{=source_path}}" />
>> <input type="hidden" id = "extracted_path" name="extracted_path"
>> value="{{=extracted_path}}" />
>> <form/>
>>
>> <form action="/{{=request.application}}/extraction/atonce"
>> method="post" id = "frmAtOnce">
>> <input type="submit" id="extSel" value="Begin Exctraction for
>> Selected Case"> </input>
>> <input type="hidden" id = "db_id" name="db_id" value="" />
>> <input type="hidden" id = "db_name" name="db_name"
>> value="{{=request.vars.dbName}}" />
>> <input type="hidden" id = "source_path" name="source_path"
>> value="{{=source_path}}" />
>> <input type="hidden" id = "extracted_path" name="extracted_path"
>> value="{{=extracted_path}}" />
>> <form/>
>>
>> Traceback (most recent call last):
>> File "/home/v3ss/workspace-bbb/web2py-clone/gluon/restricted.py",
>> line 188, in restricted
>> exec ccode in environment
>> File
>> "/home/v3ss/workspace-bbb/web2py-clone/applications/sExtract/controllers/extraction.py",
>> line 117, in <module>
>> File "/home/v3ss/workspace-bbb/web2py-clone/gluon/globals.py", line
>> 96, in <lambda>
>> self._caller = lambda f: f()
>> File "/home/v3ss/workspace-bbb/web2py-clone/gluon/tools.py", line 2270,
>> in f
>> return action(*a, **b)
>> File
>> "/home/v3ss/workspace-bbb/web2py-clone/applications/sExtract/controllers/extraction.py",
>> line 44, in index
>> extracted_path=os.path.join(REQUEST.vars.extracted_path,now)
>> File "/usr/lib/python2.6/posixpath.py", line 67, in join
>> elif path == '' or path.endswith('/'):
>> AttributeError: 'list' object has no attribute 'endswith'
>>
>> Traceback (most recent call last):
>> File "/home/v3ss/workspace-bbb/web2py-clone/gluon/restricted.py",
>> line 188, in restricted
>> exec ccode in environment
>> File
>> "/home/v3ss/workspace-bbb/web2py-clone/applications/sExtract/controllers/extraction.py",
>> line 117, in <module>
>> File "/home/v3ss/workspace-bbb/web2py-clone/gluon/globals.py", line
>> 96, in <lambda>
>> self._caller = lambda f: f()
>> File "/home/v3ss/workspace-bbb/web2py-clone/gluon/tools.py", line 2270,
>> in f
>> return action(*a, **b)
>> File
>> "/home/v3ss/workspace-bbb/web2py-clone/applications/sExtract/controllers/extraction.py",
>> line 44, in index
>> extracted_path=os.path.join(REQUEST.vars.extracted_path,now)
>> File "/usr/lib/python2.6/posixpath.py", line 67, in join
>> elif path == '' or path.endswith('/'):
>> AttributeError: 'list' object has no attribute 'endswith'