{"action":"created","issue":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2555","repository_url":"https://api.github.com/repos/tomchristie/django-rest-framework","labels_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2555/labels{/name}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2555/comments","events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2555/events","html_url":"https://github.com/tomchristie/django-rest-framework/issues/2555","id":57588324,"number":2555,"title":"Nested serializer does not receive view context","user":{"login":"iorlas","id":460890,"avatar_url":"https://avatars.githubusercontent.com/u/460890?v=3","gravatar_id":"","url":"https://api.github.com/users/iorlas","html_url":"https://github.com/iorlas","followers_url":"https://api.github.com/users/iorlas/followers","following_url":"https://api.github.com/users/iorlas/following{/other_user}","gists_url":"https://api.github.com/users/iorlas/gists{/gist_id}","starred_url":"https://api.github.com/users/iorlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iorlas/subscriptions","organizations_url":"https://api.github.com/users/iorlas/orgs","repos_url":"https://api.github.com/users/iorlas/repos","events_url":"https://api.github.com/users/iorlas/events{/privacy}","received_events_url":"https://api.github.com/users/iorlas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-13T11:29:36Z","updated_at":"2016-04-04T14:39:04Z","closed_at":"2015-02-13T11:53:18Z","body":"*It isn't stackoverflow question IMO, so excuse me if it is*\r\n\r\nI'm trying to use nested serializers, I know it is tough to discuss since we had so many problems in v2-branch. I want nested serializer field to use default based on selected project.\r\n\r\nProject ID provided in `QUERY_PARAMS` and applies in `perform_create` like it should now, in v3-branch. But I need project in some nested serializer field BEFORE save - I want to provide default values for object in serializer metadata, so user will be able to change some things, which optionally can be taken from project object.\r\n\r\nSo, I populate `context` in `get_serializer_context` with project object. And I should just rewrite `__init__` in nested serializer to set defaults, ye?\r\n\r\nThe problem is, nested serializer does not recieve `context` nor `parent` in ` __init__`. It seems, it does not recieve context at all! So, it should be a regression since [pull-request 497](https://github.com/tomchristie/django-rest-framework/pull/497).\r\n\r\nI think, it isn't regression, more like design change, but I really need context to be able to change serizliser behavior!"},"comment":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/comments/205326182","html_url":"https://github.com/tomchristie/django-rest-framework/issues/2555#issuecomment-205326182","issue_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2555","id":205326182,"user":{"login":"ionchiciuc","id":15868856,"avatar_url":"https://avatars.githubusercontent.com/u/15868856?v=3","gravatar_id":"","url":"https://api.github.com/users/ionchiciuc","html_url":"https://github.com/ionchiciuc","followers_url":"https://api.github.com/users/ionchiciuc/followers","following_url":"https://api.github.com/users/ionchiciuc/following{/other_user}","gists_url":"https://api.github.com/users/ionchiciuc/gists{/gist_id}","starred_url":"https://api.github.com/users/ionchiciuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ionchiciuc/subscriptions","organizations_url":"https://api.github.com/users/ionchiciuc/orgs","repos_url":"https://api.github.com/users/ionchiciuc/repos","events_url":"https://api.github.com/users/ionchiciuc/events{/privacy}","received_events_url":"https://api.github.com/users/ionchiciuc/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T14:39:04Z","updated_at":"2016-04-04T14:39:04Z","body":"Does it work for DRF 2?"}}