{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/22608136","id":22608136,"diff_hunk":"@@ -221,17 +220,7 @@ def unarchive_location(request, domain, loc_id):\n     })\n \n \n-class EditLocationView(NewLocationView):\n-    urlname = 'edit_location'\n-    page_title = ugettext_noop(\"Edit Location\")\n-\n-    @property\n-    @memoized\n-    def location_form(self):\n-        if self.request.method == 'POST':\n-            return LocationForm(self.location, self.request.POST)\n-        return LocationForm(self.location)\n-\n+class IndividualLocationMixin(object):","path":"corehq/apps/locations/views.py","position":43,"original_position":43,"commit_id":"f1f67f06d65245f7e31714d9c60dbb9c23be5ca0","original_commit_id":"f1f67f06d65245f7e31714d9c60dbb9c23be5ca0","user":{"login":"twymer","id":152134,"avatar_url":"https://avatars.githubusercontent.com/u/152134?v=3","gravatar_id":"","url":"https://api.github.com/users/twymer","html_url":"https://github.com/twymer","followers_url":"https://api.github.com/users/twymer/followers","following_url":"https://api.github.com/users/twymer/following{/other_user}","gists_url":"https://api.github.com/users/twymer/gists{/gist_id}","starred_url":"https://api.github.com/users/twymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twymer/subscriptions","organizations_url":"https://api.github.com/users/twymer/orgs","repos_url":"https://api.github.com/users/twymer/repos","events_url":"https://api.github.com/users/twymer/events{/privacy}","received_events_url":"https://api.github.com/users/twymer/received_events","type":"User","site_admin":false},"body":"What, then, is a `MultipleLocatinonMixin` (or whatever is the inverse of `Individual` here)?","created_at":"2015-01-07T19:17:40Z","updated_at":"2015-01-07T19:17:40Z","html_url":"https://github.com/dimagi/commcare-hq/pull/5197#discussion_r22608136","pull_request_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/22608136"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/5197#discussion_r22608136"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197","id":26776828,"html_url":"https://github.com/dimagi/commcare-hq/pull/5197","diff_url":"https://github.com/dimagi/commcare-hq/pull/5197.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/5197.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5197","number":5197,"state":"open","locked":false,"title":"Specify products stocked per location","user":{"login":"esoergel","id":2367539,"avatar_url":"https://avatars.githubusercontent.com/u/2367539?v=3","gravatar_id":"","url":"https://api.github.com/users/esoergel","html_url":"https://github.com/esoergel","followers_url":"https://api.github.com/users/esoergel/followers","following_url":"https://api.github.com/users/esoergel/following{/other_user}","gists_url":"https://api.github.com/users/esoergel/gists{/gist_id}","starred_url":"https://api.github.com/users/esoergel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esoergel/subscriptions","organizations_url":"https://api.github.com/users/esoergel/orgs","repos_url":"https://api.github.com/users/esoergel/repos","events_url":"https://api.github.com/users/esoergel/events{/privacy}","received_events_url":"https://api.github.com/users/esoergel/received_events","type":"User","site_admin":false},"body":"This doesn't actually do anything yet.  This PR includes a UI (behind a feature flag) to specify products stocked at a location, and a persistence layer.\n\nRemaining questions:\n\n* Where should I stick the link to this?  Right now it's on the locations list page next to edit and archive.  Seems overly prominent.\n* I imagine once this goes live we'll make it an opt-in feature, or maybe a feature preview.  The majority of projects probably won't need this, so it'd just be clutter.\n* How should heirarchies be handled?  Right now everything is on a location-by-location basis.  Seems like we'd want to do either:\n  * Locations which don't track stock can't specify products\n  * Parent locations specify which products are available for their children.  Maybe this should be a checkbox on each parent location?  But that sounds too complex.\n\n@twymer @czue","created_at":"2015-01-03T00:36:14Z","updated_at":"2015-01-07T19:17:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"929856bed72fe198aa517627f406edacc1ae13cf","assignee":{"login":"twymer","id":152134,"avatar_url":"https://avatars.githubusercontent.com/u/152134?v=3","gravatar_id":"","url":"https://api.github.com/users/twymer","html_url":"https://github.com/twymer","followers_url":"https://api.github.com/users/twymer/followers","following_url":"https://api.github.com/users/twymer/following{/other_user}","gists_url":"https://api.github.com/users/twymer/gists{/gist_id}","starred_url":"https://api.github.com/users/twymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twymer/subscriptions","organizations_url":"https://api.github.com/users/twymer/orgs","repos_url":"https://api.github.com/users/twymer/repos","events_url":"https://api.github.com/users/twymer/events{/privacy}","received_events_url":"https://api.github.com/users/twymer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5197/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/f1f67f06d65245f7e31714d9c60dbb9c23be5ca0","head":{"label":"dimagi:product-locations","ref":"product-locations","sha":"f1f67f06d65245f7e31714d9c60dbb9c23be5ca0","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments/{number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","created_at":"2009-07-09T17:00:07Z","updated_at":"2015-01-07T18:40:26Z","pushed_at":"2015-01-07T19:10:33Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"http://www.commcarehq.org","size":185466,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":55,"mirror_url":null,"open_issues_count":43,"forks":55,"open_issues":43,"watchers":40,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"080cd43981499634c9cfa42b40489a7c1620eb44","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments/{number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","created_at":"2009-07-09T17:00:07Z","updated_at":"2015-01-07T18:40:26Z","pushed_at":"2015-01-07T19:10:33Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"http://www.commcarehq.org","size":185466,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":55,"mirror_url":null,"open_issues_count":43,"forks":55,"open_issues":43,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/5197"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/5197"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/5197/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5197/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-hq/statuses/f1f67f06d65245f7e31714d9c60dbb9c23be5ca0"}}}}