Massimo,
> It looks to me you have a new version of globals.py but an old version
> of sql.py. Is this possible?
Yes, upgrading to version 1.65.7 solved the problem.
But now I am facing the following problem:
In my model I defined the following table:
db.define_table('level',
db.Field('level',length=36,default='',notnull=True,unique=True),
db.Field('image',type='upload'),
migrate='level.table')
db.level.level.requires=[IS_LENGTH(36,error_message='lengte
overschreidt 36 tekens'),IS_NOT_EMPTY(),IS_NOT_IN_DB
(db,'level.level',error_message='level niet uniek')]
db.level.level.label='Level * '
db.level.image.autodelete=True
In my controller I got the following function:
def timetable():
...
timetable=db((db.lesrooster.bedrijf==company_id)&
(db.lesrooster.dag==db.dag.id)&(db.lesrooster.level==db.level.id))\
.select
(db.lesrooster.ALL,db.dag.dag,db.level.image,orderby=db.lesrooster.dag|
db.lesrooster.tijd)
...
return dict(..., timetable=timetable, ...)
... and in my view:
...
<td>
{{=activiteit.level.image}}
</td>
...
The problem is, that when I expose the function instead of the image
the file name:
level.image.aef56e3f826179e6.677265656e5f646f742e706e67.png is being
displayed. Why is that?
Kind regards,
Annet.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---