djangorestframework + mongodb

517 views
Skip to first unread message

Hélio Miranda

unread,
Feb 28, 2013, 9:10:17 AM2/28/13
to django-res...@googlegroups.com
hello

I'm new to django and I'm trying to implement a rest api with mongodb using mongoengine ...
But it gives me an error, this is my code I'm trying:


But the browser says: can not import name View
Someone can tell me what I'm doing wrong?

thank you

Tom Christie

unread,
Feb 28, 2013, 3:35:19 PM2/28/13
to django-res...@googlegroups.com
Hi Hélio,

  It looks like you're working from the documentation for the older 0.4.x version.
Please refer to http://django-rest-framework.org for the current documentation.
You should be using the `APIView` class.  REST framework doesn't have a `View` class which is why you're getting the import error.
Reply all
Reply to author
Forward
0 new messages