This is working fine but when i update to the last version in the svn
start give this error
######## Error traceback #############
Traceback (most recent call last):
File "H:\python\web2py_win\web2py_source\svn\gluon\restricted.py",
line 107, in restricted
exec ccode in environment
File "h:\python\web2py_win\web2py_source\svn\applications
\Dominos_Times/views/default/list_all.html", line 62, in <module>
File "h:\python\web2py_win\web2py_source\svn\gluon\sql.py", line
2215, in __iter__
yield self[i]
File "h:\python\web2py_win\web2py_source\svn\gluon\sql.py", line
2180, in __getitem__
s = self._db(table.id == id), **a: update_record(t, s, a)
File "h:\python\web2py_win\web2py_source\svn\gluon\sql.py", line
496, in __setattr__
raise SyntaxError, 'Object exists and cannot be redefined'
SyntaxError: Object exists and cannot be redefined
############## end ###################
And this is the function is giving the error
########### Controller Code ##############
@auth.requires_login()
def customupdate():
id_order=request.args[0]
crud_output=crud.update(db.databasedp, int(id_order) ,next=URL
(r=request,args=request.args[0]))
return dict(crudupdate=crud_output)
########### END ########################
######## VIEW CODE #############
{{extend 'layout.html'}}
{{=form}}
{{if query:}}
<h2>You are checking Store{{=request.vars.store_id}} in
{{=request.vars.date}}</h2>
<br/>
<br/>
<table border="1" style="border-color: #FF9C00; border-collapse:
collapse; table-align: center;">
<tr>
<th> Options </th>
<th> Order Numer </th>
<th> Store Number </th>
<th> Reason </th>
<th> Total Amount </th>
<th> Total Credit </th>
<th> Total Payd </th>
<tr>
{{final_total_amount=0}}
{{for order in query:}}
{{if order.total_amount:}}
{{final_total_amount+=order.total_amount}}
{{pass}}
<td><a href={{=URL(r=request,f="customread",args=[order.id])}}
target="_blank">|Read|</a>
<a href={{=URL(r=request,f="customupdate",args=[order.id])}}
target="_blank">|Edit|</a></td>
<td style="text-align: center;">{{=order.Order_id}}</td>
<td style="text-align: center;">{{=order.Store_id}}</td>
<td style="text-align: center;">{{=order.reason}}</td>
<td style="text-align: center;">{{=order.total_amount}}</td>
<td style="text-align: center;">{{=order.total_credit}}</td>
<td style="text-align: center;">{{=order.total_payd}}</td>
</tr>
</br>
{{pass}}
</table>
<p> </p>
<p> </p>
<p> </p>
<h1>Final Totals</h1>
</br>
<h2> Number of orders {{=len(query)}}</h2>
<h2> Total Amount {{=final_total_amount}}</h2>
############# END ###############
Can some one tell me why start to give me this error now?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---