{"action":"created","issue":{"url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/issues/18","repository_url":"https://api.github.com/repos/bobslee/django_commerce_wagtail","labels_url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/issues/18/comments","events_url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/issues/18/events","html_url":"https://github.com/bobslee/django_commerce_wagtail/issues/18","id":185239097,"number":18,"title":"ProductAdmin (ModelAdmin form) refactor save_model() to new ProductService save()","user":{"login":"bobslee","id":328803,"avatar_url":"https://avatars.githubusercontent.com/u/328803?v=3","gravatar_id":"","url":"https://api.github.com/users/bobslee","html_url":"https://github.com/bobslee","followers_url":"https://api.github.com/users/bobslee/followers","following_url":"https://api.github.com/users/bobslee/following{/other_user}","gists_url":"https://api.github.com/users/bobslee/gists{/gist_id}","starred_url":"https://api.github.com/users/bobslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobslee/subscriptions","organizations_url":"https://api.github.com/users/bobslee/orgs","repos_url":"https://api.github.com/users/bobslee/repos","events_url":"https://api.github.com/users/bobslee/events{/privacy}","received_events_url":"https://api.github.com/users/bobslee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"bobslee","id":328803,"avatar_url":"https://avatars.githubusercontent.com/u/328803?v=3","gravatar_id":"","url":"https://api.github.com/users/bobslee","html_url":"https://github.com/bobslee","followers_url":"https://api.github.com/users/bobslee/followers","following_url":"https://api.github.com/users/bobslee/following{/other_user}","gists_url":"https://api.github.com/users/bobslee/gists{/gist_id}","starred_url":"https://api.github.com/users/bobslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobslee/subscriptions","organizations_url":"https://api.github.com/users/bobslee/orgs","repos_url":"https://api.github.com/users/bobslee/repos","events_url":"https://api.github.com/users/bobslee/events{/privacy}","received_events_url":"https://api.github.com/users/bobslee/received_events","type":"User","site_admin":false},"assignees":[{"login":"bobslee","id":328803,"avatar_url":"https://avatars.githubusercontent.com/u/328803?v=3","gravatar_id":"","url":"https://api.github.com/users/bobslee","html_url":"https://github.com/bobslee","followers_url":"https://api.github.com/users/bobslee/followers","following_url":"https://api.github.com/users/bobslee/following{/other_user}","gists_url":"https://api.github.com/users/bobslee/gists{/gist_id}","starred_url":"https://api.github.com/users/bobslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobslee/subscriptions","organizations_url":"https://api.github.com/users/bobslee/orgs","repos_url":"https://api.github.com/users/bobslee/repos","events_url":"https://api.github.com/users/bobslee/events{/privacy}","received_events_url":"https://api.github.com/users/bobslee/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/milestones/1","html_url":"https://github.com/bobslee/django_commerce_wagtail/milestones/stage%201","labels_url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/milestones/1/labels","id":2075650,"number":1,"title":"stage 1","description":"","creator":{"login":"bobslee","id":328803,"avatar_url":"https://avatars.githubusercontent.com/u/328803?v=3","gravatar_id":"","url":"https://api.github.com/users/bobslee","html_url":"https://github.com/bobslee","followers_url":"https://api.github.com/users/bobslee/followers","following_url":"https://api.github.com/users/bobslee/following{/other_user}","gists_url":"https://api.github.com/users/bobslee/gists{/gist_id}","starred_url":"https://api.github.com/users/bobslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobslee/subscriptions","organizations_url":"https://api.github.com/users/bobslee/orgs","repos_url":"https://api.github.com/users/bobslee/repos","events_url":"https://api.github.com/users/bobslee/events{/privacy}","received_events_url":"https://api.github.com/users/bobslee/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":2,"state":"open","created_at":"2016-10-17T21:26:59Z","updated_at":"2016-10-26T20:20:01Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-10-25T21:29:08Z","updated_at":"2016-10-26T20:20:01Z","closed_at":"2016-10-26T20:20:01Z","body":"The ProducAdmin (ModelAdmin) currenly implements the save_model() function, which handles to ProductPage.\r\nThis however isn't loosly coupled and should be called on class which is callable from elsewhere, like e.g. a (Rest) webservice, script etc.\r\n\r\nSo move the specific part into a new class *ProductService* (filename: product_service.py).\r\nEnsure the save does a create (change=False) or update (change=true)... and maybe provide the instance as first argument (default instance=None) in case it's an update.. See django-rest-framework for an example about ModelObjectSerializers"},"comment":{"url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/issues/comments/256465046","html_url":"https://github.com/bobslee/django_commerce_wagtail/issues/18#issuecomment-256465046","issue_url":"https://api.github.com/repos/bobslee/django_commerce_wagtail/issues/18","id":256465046,"user":{"login":"bobslee","id":328803,"avatar_url":"https://avatars.githubusercontent.com/u/328803?v=3","gravatar_id":"","url":"https://api.github.com/users/bobslee","html_url":"https://github.com/bobslee","followers_url":"https://api.github.com/users/bobslee/followers","following_url":"https://api.github.com/users/bobslee/following{/other_user}","gists_url":"https://api.github.com/users/bobslee/gists{/gist_id}","starred_url":"https://api.github.com/users/bobslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobslee/subscriptions","organizations_url":"https://api.github.com/users/bobslee/orgs","repos_url":"https://api.github.com/users/bobslee/repos","events_url":"https://api.github.com/users/bobslee/events{/privacy}","received_events_url":"https://api.github.com/users/bobslee/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T20:20:01Z","updated_at":"2016-10-26T20:20:01Z","body":"Solved/implemented in  [https://github.com/bobslee/django_commerce_wagtail/commit/b36ae7487f0c5155ade10e671515ba2697f6da5a](https://github.com/bobslee/django_commerce_wagtail/commit/b36ae7487f0c5155ade10e671515ba2697f6da5a)"}}
{"actor":{"display_login":"bobslee"}}