*Val K*, it is my table.py file:
db.define_table(
'recipes',
Field('NAME',length=512),
Field('IMAGE','upload'),
migrate=False
)
It's code in my default.py file:
row = db().select(db.recipes.IMAGE).first()
image = str(dir(row))
>>>
['IMAGE', '__bool__', '__call__', '__class__', '__contains__', '__copy__',
'__delattr__', '__delitem__', '__dict__', '__dir__', '__doc__', '__eq__',
'__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__',
'__gt__', '__hash__', '__init__', '__init_subclass__', '__int__',
'__iter__', '__le__', '__long__', '__lt__', '__module__', '__ne__',
'__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
'__setitem__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__',
'as_dict', 'as_json', 'as_xml', 'clear', 'copy', 'get', 'has_key', 'items',
'iteritems', 'iterkeys', 'itervalues', 'keys', 'pop', 'update', 'values']
image = str(dir(row.IMAGE))
>>>
['_BlobReader__blob_get', '_BlobReader__blobid', '_BlobReader__bytes_read',
'_BlobReader__charset', '_BlobReader__closed', '_BlobReader__db_handle',
'_BlobReader__ensure_open', '_BlobReader__index', '_BlobReader__is_text',
'_BlobReader__mode', '_BlobReader__open', '_BlobReader__opened',
'_BlobReader__pos', '_BlobReader__python_charset',
'_BlobReader__reset_buffer', '_BlobReader__tr_handle', '__class__',
'__del__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__',
'__format__', '__ge__', '__getattribute__', '__gt__', '__hash__',
'__init__', '__init_subclass__', '__iter__', '__le__', '__lt__',
'__module__', '__ne__', '__new__', '__next__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__', '__weakref__', '_blob_handle', '_isc_status',
'blob_charset', 'blob_id', 'charset', 'close', 'closed', 'flush',
'get_info', 'is_text', 'mode', 'next', 'read', 'readline', 'readlines',
'seek', 'tell']
I can not do row.file.row.IMAGE
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/d8a4cfbc-65e1-4119-ac2b-25c25d2a9b22%40googlegroups.com.