GitHub PullRequestEvent at 2014-11-04 23:33:30
Repository: django-rest-framework
Actor: jarrodb
Payload: {"action":"opened","number":2023,"pull_request":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2023","id":23873116,"html_url":"https://github.com/tomchristie/django-rest-framework/pull/2023","diff_url":"https://github.com/tomchristie/django-rest-framework/pull/2023.diff","patch_url":"https://github.com/tomchristie/django-rest-framework/pull/2023.patch","issue_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2023","number":2023,"state":"open","locked":false,"title":"Accomodate passing the full resource object to HyperlinkedRelatedFields instead of just the URL","user":{"login":"jarrodb","id":485817,"avatar_url":"https://avatars.githubusercontent.com/u/485817?v=2","gravatar_id":"","url":"https://api.github.com/users/jarrodb","html_url":"https://github.com/jarrodb","followers_url":"https://api.github.com/users/jarrodb/followers","following_url":"https://api.github.com/users/jarrodb/following{/other_user}","gists_url":"https://api.github.com/users/jarrodb/gists{/gist_id}","starred_url":"https://api.github.com/users/jarrodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarrodb/subscriptions","organizations_url":"https://api.github.com/users/jarrodb/orgs","repos_url":"https://api.github.com/users/jarrodb/repos","events_url":"https://api.github.com/users/jarrodb/events{/privacy}","received_events_url":"https://api.github.com/users/jarrodb/received_events","type":"User","site_admin":false},"body":"Currently, the HyperLinkedRelated field allows for only the URL (startswith(('http:', 'https:'))) to define the relation.  My proposed patch would allow for passing the entire object or an object with just the URL_FIELD_NAME:\r\n\r\nCurrently\r\n---\r\n```python\r\n{'user': 'http://testserver/v1/users/1/'}\r\n```\r\n\r\nAdd support for\r\n---\r\n```python\r\n{'user': {\r\n    'url': 'http://testserver/v1/users/1/',\r\n    'first_name': 'Tom',\r\n    'last_name': 'Christie',\r\n    'email': 'tom@christie.com',\r\n    }\r\n}\r\n```\r\n\r\nI would also propose patches (that I already use in production) to support the ability to reference related detail keys as full objects to easier denote relations on the client if this is accepted.","created_at":"2014-11-04T23:33:29Z","updated_at":"2014-11-04T23:33:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"685e946124b8730211d8816f2bc2d09562201e69","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2023/commits","review_comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2023/comments","review_comment_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2023/comments","statuses_url":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/fac579342d6fff9537ed87690ae920a10000796a","head":{"label":"jarrodb:upstream2","ref":"upstream2","sha":"fac579342d6fff9537ed87690ae920a10000796a","user":{"login":"jarrodb","id":485817,"avatar_url":"https://avatars.githubusercontent.com/u/485817?v=2","gravatar_id":"","url":"https://api.github.com/users/jarrodb","html_url":"https://github.com/jarrodb","followers_url":"https://api.github.com/users/jarrodb/followers","following_url":"https://api.github.com/users/jarrodb/following{/other_user}","gists_url":"https://api.github.com/users/jarrodb/gists{/gist_id}","starred_url":"https://api.github.com/users/jarrodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarrodb/subscriptions","organizations_url":"https://api.github.com/users/jarrodb/orgs","repos_url":"https://api.github.com/users/jarrodb/repos","events_url":"https://api.github.com/users/jarrodb/events{/privacy}","received_events_url":"https://api.github.com/users/jarrodb/received_events","type":"User","site_admin":false},"repo":{"id":26152353,"name":"django-rest-framework","full_name":"jarrodb/django-rest-framework","owner":{"login":"jarrodb","id":485817,"avatar_url":"https://avatars.githubusercontent.com/u/485817?v=2","gravatar_id":"","url":"https://api.github.com/users/jarrodb","html_url":"https://github.com/jarrodb","followers_url":"https://api.github.com/users/jarrodb/followers","following_url":"https://api.github.com/users/jarrodb/following{/other_user}","gists_url":"https://api.github.com/users/jarrodb/gists{/gist_id}","starred_url":"https://api.github.com/users/jarrodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarrodb/subscriptions","organizations_url":"https://api.github.com/users/jarrodb/orgs","repos_url":"https://api.github.com/users/jarrodb/repos","events_url":"https://api.github.com/users/jarrodb/events{/privacy}","received_events_url":"https://api.github.com/users/jarrodb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jarrodb/django-rest-framework","description":"Web APIs for Django.","fork":true,"url":"https://api.github.com/repos/jarrodb/django-rest-framework","forks_url":"https://api.github.com/repos/jarrodb/django-rest-framework/forks","keys_url":"https://api.github.com/repos/jarrodb/django-rest-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jarrodb/django-rest-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jarrodb/django-rest-framework/teams","hooks_url":"https://api.github.com/repos/jarrodb/django-rest-framework/hooks","issue_events_url":"https://api.github.com/repos/jarrodb/django-rest-framework/issues/events{/number}","events_url":"https://api.github.com/repos/jarrodb/django-rest-framework/events","assignees_url":"https://api.github.com/repos/jarrodb/django-rest-framework/assignees{/user}","branches_url":"https://api.github.com/repos/jarrodb/django-rest-framework/branches{/branch}","tags_url":"https://api.github.com/repos/jarrodb/django-rest-framework/tags","blobs_url":"https://api.github.com/repos/jarrodb/django-rest-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jarrodb/django-rest-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jarrodb/django-rest-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/jarrodb/django-rest-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jarrodb/django-rest-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/jarrodb/django-rest-framework/languages","stargazers_url":"https://api.github.com/repos/jarrodb/django-rest-framework/stargazers","contributors_url":"https://api.github.com/repos/jarrodb/django-rest-framework/contributors","subscribers_url":"https://api.github.com/repos/jarrodb/django-rest-framework/subscribers","subscription_url":"https://api.github.com/repos/jarrodb/django-rest-framework/subscription","commits_url":"https://api.github.com/repos/jarrodb/django-rest-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/jarrodb/django-rest-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/jarrodb/django-rest-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/jarrodb/django-rest-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/jarrodb/django-rest-framework/contents/{+path}","compare_url":"https://api.github.com/repos/jarrodb/django-rest-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jarrodb/django-rest-framework/merges","archive_url":"https://api.github.com/repos/jarrodb/django-rest-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jarrodb/django-rest-framework/downloads","issues_url":"https://api.github.com/repos/jarrodb/django-rest-framework/issues{/number}","pulls_url":"https://api.github.com/repos/jarrodb/django-rest-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/jarrodb/django-rest-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/jarrodb/django-rest-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jarrodb/django-rest-framework/labels{/name}","releases_url":"https://api.github.com/repos/jarrodb/django-rest-framework/releases{/id}","created_at":"2014-11-04T04:10:20Z","updated_at":"2014-11-04T04:14:34Z","pushed_at":"2014-11-04T23:27:08Z","git_url":"git://github.com/jarrodb/django-rest-framework.git","ssh_url":"git@github.com:jarrodb/django-rest-framework.git","clone_url":"https://github.com/jarrodb/django-rest-framework.git","svn_url":"https://github.com/jarrodb/django-rest-framework","homepage":"www.django-rest-framework.org","size":30824,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tomchristie:master","ref":"master","sha":"5ee472718a065497eafe8c9e7e6108e828040aee","user":{"login":"tomchristie","id":647359,"avatar_url":"https://avatars.githubusercontent.com/u/647359?v=2","gravatar_id":"","url":"https://api.github.com/users/tomchristie","html_url":"https://github.com/tomchristie","followers_url":"https://api.github.com/users/tomchristie/followers","following_url":"https://api.github.com/users/tomchristie/following{/other_user}","gists_url":"https://api.github.com/users/tomchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchristie/subscriptions","organizations_url":"https://api.github.com/users/tomchristie/orgs","repos_url":"https://api.github.com/users/tomchristie/repos","events_url":"https://api.github.com/users/tomchristie/events{/privacy}","received_events_url":"https://api.github.com/users/tomchristie/received_events","type":"User","site_admin":false},"repo":{"id":1431547,"name":"django-rest-framework","full_name":"tomchristie/django-rest-framework","owner":{"login":"tomchristie","id":647359,"avatar_url":"https://avatars.githubusercontent.com/u/647359?v=2","gravatar_id":"","url":"https://api.github.com/users/tomchristie","html_url":"https://github.com/tomchristie","followers_url":"https://api.github.com/users/tomchristie/followers","following_url":"https://api.github.com/users/tomchristie/following{/other_user}","gists_url":"https://api.github.com/users/tomchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchristie/subscriptions","organizations_url":"https://api.github.com/users/tomchristie/orgs","repos_url":"https://api.github.com/users/tomchristie/repos","events_url":"https://api.github.com/users/tomchristie/events{/privacy}","received_events_url":"https://api.github.com/users/tomchristie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomchristie/django-rest-framework","description":"Web APIs for Django.","fork":false,"url":"https://api.github.com/repos/tomchristie/django-rest-framework","forks_url":"https://api.github.com/repos/tomchristie/django-rest-framework/forks","keys_url":"https://api.github.com/repos/tomchristie/django-rest-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomchristie/django-rest-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomchristie/django-rest-framework/teams","hooks_url":"https://api.github.com/repos/tomchristie/django-rest-framework/hooks","issue_events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/events{/number}","events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/events","assignees_url":"https://api.github.com/repos/tomchristie/django-rest-framework/assignees{/user}","branches_url":"https://api.github.com/repos/tomchristie/django-rest-framework/branches{/branch}","tags_url":"https://api.github.com/repos/tomchristie/django-rest-framework/tags","blobs_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/tomchristie/django-rest-framework/languages","stargazers_url":"https://api.github.com/repos/tomchristie/django-rest-framework/stargazers","contributors_url":"https://api.github.com/repos/tomchristie/django-rest-framework/contributors","subscribers_url":"https://api.github.com/repos/tomchristie/django-rest-framework/subscribers","subscription_url":"https://api.github.com/repos/tomchristie/django-rest-framework/subscription","commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/tomchristie/django-rest-framework/contents/{+path}","compare_url":"https://api.github.com/repos/tomchristie/django-rest-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomchristie/django-rest-framework/merges","archive_url":"https://api.github.com/repos/tomchristie/django-rest-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomchristie/django-rest-framework/downloads","issues_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues{/number}","pulls_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/tomchristie/django-rest-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/tomchristie/django-rest-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomchristie/django-rest-framework/labels{/name}","releases_url":"https://api.github.com/repos/tomchristie/django-rest-framework/releases{/id}","created_at":"2011-03-02T17:13:56Z","updated_at":"2014-11-04T22:36:12Z","pushed_at":"2014-11-03T20:07:28Z","git_url":"git://github.com/tomchristie/django-rest-framework.git","ssh_url":"git@github.com:tomchristie/django-rest-framework.git","clone_url":"https://github.com/tomchristie/django-rest-framework.git","svn_url":"https://github.com/tomchristie/django-rest-framework","homepage":"www.django-rest-framework.org","size":30824,"stargazers_count":2993,"watchers_count":2993,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":927,"mirror_url":null,"open_issues_count":72,"forks":927,"open_issues":72,"watchers":2993,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2023"},"html":{"href":"https://github.com/tomchristie/django-rest-framework/pull/2023"},"issue":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2023"},"comments":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2023/comments"},"review_comments":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2023/comments"},"review_comment":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2023/commits"},"statuses":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/fac579342d6fff9537ed87690ae920a10000796a"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":0,"changed_files":1}}