After a bit of research this is what I found the table which caused an
error (it has been removed temporarily) but....

db.define_table('trailer',
   Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
writable=False),
   Field('title',requires=IS_NOT_EMPTY()),
   Field('description','text',requires=IS_NOT_EMPTY()),
   Field('keywords'),
   Field('trailer_link',requires=IS_NOT_EMPTY(),label='Trailer
Embed',comment='Enter Your Trailer embed code here'),
   Field('image','upload', label='Image', autodelete=True,
requires=[IS_IMAGE(extensions=('png', 'gif', 'jpg', 'jpeg')), RESIZE(600,
340)]),
   Field('image_thumb', 'upload', compute=lambda r: THUMB(r['image'], 120,
64)),   Field('views','integer',default=1,readable=False,writable=False),

Field('created_on','datetime',default=request.now,readable=False,writable=False),
   Field('air_date','date',requires=IS_NOT_EMPTY()))

the query

trailers = db(db.trailer.id>0).select(orderby=~db.trailer.air_date)

and the

html

{{for trailer in trailers:}}
           <a href="{{=URL('view','trailer',args=trailer.id)}}"
title={{=trailer.title}}"><img width="100" height="65" border="0"
align="left" src="{{=URL('default', 'download',args=trailer.image_thumb)}}"
alt="{{=trailer.title}}" /></a>
          {{pass}}

seemed to cause on invalid literal for base 10 on the date data :-| if
anyone has suggestions on how to fix this cause I would still like to use
this feature

*cheers

Andrew

Reply via email to