I'm trying to add a new record into Mongo DB using Django REST Framework:

def post(self, request, *args, **kwargs):
    data = request.data
    serializer = self.serializer_class(data=data)
    serializer.is_valid(raise_exception=True)


During data serialization I've got an error: `Serializer X.Y` has old-style 
version 2 `.restore_object()` that is no longer compatible with REST 
framework 3. Use the new-style `.create()` and `.update()` methods instead.`

Well, where I should use one of these classes? And why these versions are 
not compatible?

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to