def show_event(): event_id = request.vars['event_id'] event_record = db.event(event_id) # Check if event exists if not event_record: raise HTTP(400, 'No event found') # Check if it's member return Storage(event=event_record.as_dict())
----------- http://localhost:8000/test/show_event.json?event_id=4 When I call the above address, it says <type 'exceptions.TypeError'>('NoneType' object is not callable) If I change the last line to "return dict(event=event_record.as_dict())", then it works. I want to use event_record as Storage in my view. Please help me with this issue. --