No, it looks like you need to set a model in the Meta class as part of your ModelSerializer class.
http://www.django-rest-framework.org/api-guide/serializers/#modelserializer Is "XYZ" a valid slug to retrieve that Address object? You probably need to provide the PK value for the 'address' rather than some other field, otherwise you'll be doing some crazy overriding to pull the right Address object. Your submitted data dictionary is probably going to look something like this: {"address":"14","prefs":"0"}' Where 14 is the PK of the Address object you want to use. I'm a little out in the weeds here since I don't have a DRF setup of my own, so please make sure you read through the docs. Typically, you won't be submitting the "human readable" version of related (foreign key) field via POST, it will almost always be a PK. The same rule applies for any field that has a 'choices' attribute, you would submit the key value, not the display value. In the case of 'prefs', this would be "1", "3", etc. rather than "Likes" or "Dislikes", per your Preferences list. API's are made for computers to communicate with other computers, not for people. -James James. address table already has a record of name xyz. Request object has a address value of address: xyz. As I am initializing serialize with request.data, why is it that I don't see it in validated_data? Do I need to add address_id to validated_data in my view? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6d31cc5b-41d2-49b4-a193-5743330914f9%40googlegroups.com . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciURnXSqW6kucbXcEFvqsRjK8Eem7dQD6xnPqus%2Binyk_Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.