i'm sorry. my mistake
here is the whole thing:
in db.py
+++++++++++++++++
db.define_table('racun',
Field('stevilka_racuna','integer',label='številka računa'),
Field('datum_racuna','date',label='datum računa'),
Field('datum_dobave','date',label='datum dobave'),
Field('zapadlost','date',label='zapadlost'),
Field('sklic','integer',label='sklic'),
Field('placnik',db.oseba,label='plačnik'),
Field('placano','boolean',label='plačano'),
Field('opomba','string',label='opomba'),
Field('sporocilo_kupcu','string',label='sporočilo kupcu'),
format='%(stevilka_racuna)s %(datum_racuna)s')
db.racun.stevilka_racuna.requires=IS_NOT_EMPTY()
db.racun.zapadlost.requires = IS_EMPTY_OR(IS_DATE())
db.racun.placnik.requires=IS_IN_DB(db,'oseba.id','%(ime)s %(priimek)s')
+++++++++++++++++++++++++++++++++
in controller racun.py
++++++++++++++++++++++++++
@auth.requires_login()
def racun_uredi(): # urejanje računa
racun = db(db.racun.id==request.args(0)).select().first()
form=crud.update(db.racun,request.args(0))
if form.accepts(request.vars, session):
session.flash = 'račun je posodobljen'
redirect(URL(racuni))
elif form.errors:
response.flash = 'napaka'
else:
response.flash = 'uredi račun'
return dict(form=form)
+++++++++++++++++++++++++++++
in view racun_uredi.html
+++++++++++++++++++++++++++++
{{extend 'layout.html'}}
<h2>Uredi račun</h2>
{{=form}}
+++++++++++++++++++++++++++++
ticket
+++++++++++++++++++++++++++++
Traceback (most recent call last):
File "...gluon\restricted.py", line 181, in restricted
exec ccode in environment
File ".../controllers/racun.py", line 65, in <module>
File "...\web2py\gluon\globals.py", line 133, in <lambda>
self._caller = lambda f: f()
File "...\web2py\gluon\tools.py", line 2335, in f
return action(*a, **b)
File ".../controllers/racun.py", line 26, in racun_uredi
if form.accepts(request.vars, session):
File "...\gluon\sqlhtml.py", line 1200, in accepts
self.table._db(self.table.id == self.record.id).update(**fields)
File "...\gluon\dal.py", line 5173, in update
fields = self.db[tablename]._listify(update_fields,update=True)
File "...gluon\dal.py", line 4464, in _listify
raise SyntaxError, 'Field %s does not belong to the table' % name
SyntaxError: Field delete_this_record does not belong to the table
++++++++++++++++++++++++++++++++++++
request.vars
+++++++++++++++++++++++++++++++++
post_vars :
datum_dobave : 2011-04-03
datum_racuna : 2011-04-03
id : 1
opomba :
placnik :2
sklic :1
sporocilo_kupcu :
stevilka_racuna :1
zapadlost :
+++++++++++++++++++++++++++++
get_vars is empty
it is the same mistake in trunk and in current
andrej