url(r'^setProfile/', AddToUserProfile),
class AddToUserProfile(generics.ListAPIView):
queryset = UserPrefs.objects.all()
serializer_class = UserPrefSerializer
class UserPrefSerializer(serializers.ModelSerializer):
class Meta:
model = UserPrefs
fields = ('id', 'prefs', 'obj_id', 'user_id')
depth = 1
I have read on previous posts that I need to add a context_instance=RequestContext(request)
How do I add it and what is the right way to handle this?
- Shekar
url(r'^setProfile/', AddToUserProfile.as_view()),
I will try the other curl option as well.