Can't get my view to display the pictures in the database.. {{for xxx in records:}} <tr> <td> <img width="150" src="{{=URL(a='Assignment', c='default', r=request, f='download', args=xxx.Picture)}}" alt="no picture provided" /> <!--This line above is exactly what i copied from the slides --> </td> {{pass}} </tr>
Encounter error: Error traceback 1. 2. 3. 4. 5. 6. Traceback (most recent call last): File "I:\wdd-softw\web2py\gluon\restricted.py", line 184, in restricted File "K:\wdd-softw\web2py\applications\Assignment/views/default/getMeOut.html", line 72, in <module> File "I:\wdd-softw\web2py\gluon\sql.py", line 621, in __getattr__ KeyError: 'Picture' Controller: def addCarrier(): form=SQLFORM(db.Carrier) if form.accepts(request.vars, session): response.flash="Carrier added to the database" records=SQLTABLE(db().select(db.Carrier.ALL)) return dict(form=form, records=records) --