Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/gluon/restricted.py", line 192, in
restricted
exec ccode in environment
File "/home/praveen/web2py/applications/my_images/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/my_images/controllers/default.py>,
line 17, in <module>
File "/usr/lib/pymodules/python2.7/gluon/globals.py", line 137, in <lambda>
self._caller = lambda f: f()
File "/home/praveen/web2py/applications/my_images/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/my_images/controllers/default.py>,
line 9, in show
if form.process().accepted:
AttributeError: 'SQLFORM' object has no attribute 'process'
i think this is the trace back msg
On Tuesday, March 13, 2012 11:43:20 PM UTC+1, rochacbruno wrote:
>
> where is the traceback erro message?
>
>
> Hii,
>> I am getting an error at line 9: in creating an image blog in
>> ubuntu(linux) 11.10 ,I have installed the web2py through terminal
>>
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>>
>> 10.
>> 11.
>> 12.
>> 13.
>>
>>
>> def show():
>> image = db(db.image.id==request.args(0)).select().first()
>>
>>
>> db.comment.image_id.default = image.id
>>
>>
>> form = SQLFORM(db.comment)
>>
>> if form.process().accepted:
>>
>>
>> response.flash = 'your comment is posted'
>>
>>
>> comments = db(db.comment.image_id==image.id).select()
>>
>>
>> return dict(image=image, comments=comments, form=form)
>>
>>
>>
>>
>> return dict(image=image, comments=comments, form=form)
>>
>>
>> I am not getting how to sort it out .
>> and the script which I used in default.py is
>> def index():
>> images = db().select(db.image.ALL, orderby=db.image.title)
>>
>>
>> return dict(images=images)
>>
>> def show():
>>
>>
>> image = db(db.image.id==request
>> <http://127.0.0.1:8000/examples/global/vars/request>.args(0)).select().first()
>>
>>
>> db.comment.image_id.default = image.id
>>
>>
>> form = SQLFORM
>> <http://127.0.0.1:8000/examples/global/vars/SQLFORM>(db.comment)
>>
>>
>> if form.process().accepted:
>> response <http://127.0.0.1:8000/examples/global/vars/response>.flash
>> = 'your comment is posted'
>>
>>
>> comments = db(db.comment.image_id==image.id).select()
>>
>>
>> return dict(image=image, comments=comments, form=form)
>>
>>
>> def download():
>> return response
>> <http://127.0.0.1:8000/examples/global/vars/response>.download(request
>> <http://127.0.0.1:8000/examples/global/vars/request>, db)
>>
>>
>> response
>> <http://127.0.0.1:8000/examples/global/vars/response>._vars=response
>> <http://127.0.0.1:8000/examples/global/vars/response>._caller(show)
>>
>>
>>
>>
>>
>
>
> --
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>