Hi, If anyone have a answer - pls. reply:
*My model:* db.define_table('newcomp', Field('uuid', length=64, default=uuid.uuid1()), Field('name'), Field('address')) db.newcomp.uuid.writable=False when I run this directly from the controller, or in db admin tool is works fine. When I run it from view I get a name error. *Here is the view model:* ________________________ {{response.files.append(URL(r=request,c='static',f='jquery.dataTables.min.js'))}} {{response.files.append(URL(r=request,c='static',f='demo_table.css'))}} {{extend 'layout.html'}} <script> $(document).ready(function() { jQuery('.smarttable').dataTable(); }); </script> <h1>List Companies</h1> [<a href="#nil" onclick="jQuery('.form').slideToggle();">new company</a>] <div class="form hidden"> <br /> {{=form}} </div> <br /><br /> <table class="smarttable"> <thead> <tr> <th>Name</th><th>company</th> </tr> </thead> <tbody> {{for company in companies:}} <tr> <td>{{=uuid}}</td> <td>{{=address}}</td> </tr> {{pass}} </tbody> </table> _______________ this works fine if I use {{=uuid}} and / or {{=id}}. If I add the address or name field I get this: Traceback (most recent call last): File "C:\web2py\web2py\gluon\restricted.py", line 188, in restricted exec ccode in environment File "C:\web2py\web2py\applications\tq/views\default/list_newcomp.html", line 77, in <module> NameError: name 'address' is not defined -- Hilsen Ole Martin Mob: 95227471