I don't know because I'm sure mounths ago it was working...
form = SQLFORM.grid(query, args=[studente], fields=[db.evento.titolo,
db.evento.ricorrenza, db.evento.giorno_inizio, db.evento.inizio,
db.evento.fine, db.evento.risorsa, db.evento.materia,
db.evento.docente],headers=headers,create=False, details=False,
editable=False, deletable=False, searchable=False, maxtextlength=60,
exportclasses = exportcls)
this is the table...
db.define_table('evento',
Field('titolo', requires=[IS_NOT_EMPTY()]),
Field('inizio', type='datetime'),
Field('fine', type='datetime'),
Field('uniqueid', type='string'),
Field('ricorrenza', requires = IS_IN_SET(['0', '1', '2',
'3', '4', '5', '6', '7', '8', '9', '10'], error_message='deve essere un
numero da 0 a 10'), default= '0'),
Field.Virtual('giorno_inizio', lambda
row:calendar.day_name[row.evento.inizio.weekday()]),
Field('risorsa', 'reference risorsa'),
Field('docente', 'reference auth_user'),
Field('materia', 'reference materia'),
Field('studenti', 'list:reference auth_user'),
Field('colore', default = '#8080ff'),
Field('controllato', type='boolean', default=False),
Field('note'),
auth.signature,singular="Evento",plural="Eventi",migrate='evento.table',
format='%(titolo)s')
# questa impostazione serve per rappresentare inizio senza i secondi
db.evento.inizio.represent = lambda value, row: value.strftime("%d/%m/%Y
%H:%M")
db.evento.fine.represent = lambda value, row: value.strftime("%d/%m/%Y
%H:%M")
db.evento.giorno_inizio.represent = lambda giorno_inizio, row:
T(giorno_inizio)
I think it's a problem about the last version of web2py..
--
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].
For more options, visit https://groups.google.com/d/optout.