When I update record with upload field using database administration
tool of admin interface, loaded image file into this upload file is
shown with thumb, link to file and delete checkbox.
When I try to update this record in my controller, I see input field
with browse button only.
Please, suggest the way to add thumb, link to file and delete checkbox
to upload field in my controller/
I write following code...
in db.py:
db.define_table(...
Field('photo_normal', 'upload', label='Photo', autodelete=True),
...)
in controller:
...
model_id = request.args(0)
color_id = request.args(1) if len(request.args) > 1 else 0
if color_id:
row = db(db.product_color.id==color_id).select()
if len(row)<=0:
redirect(URL(r=request, f='index'))
form = SQLFORM(db.product_color, row[0], deletable=True)
else:
form = SQLFORM(db.product_color)
form.vars.model_id = model_id
...
Thank you
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.