jfinkels/flask-restless — pull request #89 by klinkin (2012-08-08 16:14:22+00:00)
Title: Filling test data before start app.

Hi, jfinkels!

I have added populate data to quickstart.py example.

But when i visit http://host:port/api/computer i bough an exception.

Any idea?
----------------------------
Traceback (most recent call last)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__
return self.wsgi_app(environ, start_response)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
rv = self.dispatch_request()
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/views.py", line 83, in view
return self.dispatch_request(*args, **kwargs)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask/views.py", line 150, in dispatch_request
return meth(*args, **kwargs)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask_restless/views.py", line 815, in get
return self._search()
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask_restless/views.py", line 727, in _search
return self._paginated(result, deep)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask_restless/views.py", line 764, in _paginated
for x in instances[start:end]]
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask_restless/views.py", line 210, in _to_dict_include
result = _to_dict(instance, deep, exclude)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask_restless/views.py", line 189, in _to_dict
result[relation] = _to_dict(relatedvalue, rdeep, newexclude)
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/flask_restless/views.py", line 167, in _to_dict
columns = (p.key for p in object_mapper(instance).iterate_properties
File "/Volumes/Home/Users/mklimin/Envs/flaskrest/lib/python2.7/site-packages/sqlalchemy/orm/util.py", line 639, in object_mapper
raise exc.UnmappedInstanceError(instance)
UnmappedInstanceError: Class 'sqlalchemy.orm.dynamic.AppenderBaseQuery' is not mapped