I'm trying to do some custom activities in a ModelViewSet 'perform_create', 
and I was wondering what the best way to convert request.data URLs into 
objects.

for example 
{
    "Example": "http://localhost:8000/rest/example/30/";,
}

How can I convert the string there into an object without going into the 
serializer?

i.e., : 

class ConnectionViewSet(viewsets.ModelViewSet):
    queryset = Connection.objects.all()
    serializer_class = ConnectionSerializer

    def perform_create(self, serializer): 
       * # how do I get the specific example object here from the URL 
passed in*
        example_object.do_something()
        instance = serializer.save()

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to