{"action":"created","comment":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments/80042254","id":80042254,"diff_hunk":"@@ -0,0 +1,44 @@\n+# Including forms into Wagtail page context","path":"docs/forms-in-wagtail.md","position":1,"original_position":1,"commit_id":"9646ad03b4ae466ff3d535f7b839df1367bffeab","original_commit_id":"9646ad03b4ae466ff3d535f7b839df1367bffeab","user":{"login":"chosak","id":654645,"avatar_url":"https://avatars.githubusercontent.com/u/654645?v=3","gravatar_id":"","url":"https://api.github.com/users/chosak","html_url":"https://github.com/chosak","followers_url":"https://api.github.com/users/chosak/followers","following_url":"https://api.github.com/users/chosak/following{/other_user}","gists_url":"https://api.github.com/users/chosak/gists{/gist_id}","starred_url":"https://api.github.com/users/chosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chosak/subscriptions","organizations_url":"https://api.github.com/users/chosak/orgs","repos_url":"https://api.github.com/users/chosak/repos","events_url":"https://api.github.com/users/chosak/events{/privacy}","received_events_url":"https://api.github.com/users/chosak/received_events","type":"User","site_admin":false},"body":"I like this documentation although I might leave out the first two paragraphs which are, although perhaps fairly critical of Wagtail's form support, more internal details of our development process and less appropriate for developers trying to use the code.","created_at":"2016-09-22T13:41:47Z","updated_at":"2016-09-22T13:43:55Z","html_url":"https://github.com/cfpb/cfgov-refresh/pull/2411#discussion_r80042254","pull_request_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411","_links":{"self":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments/80042254"},"html":{"href":"https://github.com/cfpb/cfgov-refresh/pull/2411#discussion_r80042254"},"pull_request":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411"}}},"pull_request":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411","id":86185740,"html_url":"https://github.com/cfpb/cfgov-refresh/pull/2411","diff_url":"https://github.com/cfpb/cfgov-refresh/pull/2411.diff","patch_url":"https://github.com/cfpb/cfgov-refresh/pull/2411.patch","issue_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2411","number":2411,"state":"open","locked":false,"title":"Add AbstractFormBlock for handling forms in Wagtail pages","user":{"login":"kurtrwall","id":1412978,"avatar_url":"https://avatars.githubusercontent.com/u/1412978?v=3","gravatar_id":"","url":"https://api.github.com/users/kurtrwall","html_url":"https://github.com/kurtrwall","followers_url":"https://api.github.com/users/kurtrwall/followers","following_url":"https://api.github.com/users/kurtrwall/following{/other_user}","gists_url":"https://api.github.com/users/kurtrwall/gists{/gist_id}","starred_url":"https://api.github.com/users/kurtrwall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurtrwall/subscriptions","organizations_url":"https://api.github.com/users/kurtrwall/orgs","repos_url":"https://api.github.com/users/kurtrwall/repos","events_url":"https://api.github.com/users/kurtrwall/events{/privacy}","received_events_url":"https://api.github.com/users/kurtrwall/received_events","type":"User","site_admin":false},"body":"This adds a block class to be used for modules that have a form. The class automatically handles getting the form into the context of the page. Developers should only have to follow steps from the docs to get the form in the page context.\r\n\r\n## Additions\r\n\r\n- AbstractFormBlock\r\n- `CFGOVPage.serve_ajax()` to handle ajax requests.\r\n- util module\r\n - `load_class` that takes in a path to a class and returns the class\r\n - `get_streamfields` returns a dictionary of a page's streamfield names and values\r\n- `form_module_handlers` function to add form module's context to the page's context\r\n\r\n## Changes\r\n\r\n- `CFGOVPage.serve` overridden to call `serve_ajax` for ajax requests.\r\n- `CFGOVPage.get_context` overridden to call registered `cfgovpage-context-handlers` functions\r\n\r\n## Testing\r\n\r\n- `tox`\r\n\r\n## Review\r\n\r\n- @cfpb/cfgov-backends \r\n- @hillaryj \r\n\r\n## Checklist\r\n\r\n* [x] Changes are limited to a single goal (no scope creep)\r\n* [x] Code can be automatically merged (no conflicts)\r\n* [ ] Code follows the standards laid out in the [front end playbook](https://github.com/cfpb/front-end)\r\n* [x] Passes all existing automated tests\r\n* [x] New functions include new tests\r\n* [x] New functions are documented (with a description, list of inputs, and expected output)\r\n* [x] Placeholder code is flagged\r\n* [ ] Visually tested in supported browsers and devices\r\n* [x] Project documentation has been updated (including the \"Unreleased\" section of the CHANGELOG)\r\n\r\n","created_at":"2016-09-21T15:27:08Z","updated_at":"2016-09-22T13:43:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2d974129fdf1678bd9709af07120a592def9964","assignee":{"login":"chosak","id":654645,"avatar_url":"https://avatars.githubusercontent.com/u/654645?v=3","gravatar_id":"","url":"https://api.github.com/users/chosak","html_url":"https://github.com/chosak","followers_url":"https://api.github.com/users/chosak/followers","following_url":"https://api.github.com/users/chosak/following{/other_user}","gists_url":"https://api.github.com/users/chosak/gists{/gist_id}","starred_url":"https://api.github.com/users/chosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chosak/subscriptions","organizations_url":"https://api.github.com/users/chosak/orgs","repos_url":"https://api.github.com/users/chosak/repos","events_url":"https://api.github.com/users/chosak/events{/privacy}","received_events_url":"https://api.github.com/users/chosak/received_events","type":"User","site_admin":false},"assignees":[{"login":"chosak","id":654645,"avatar_url":"https://avatars.githubusercontent.com/u/654645?v=3","gravatar_id":"","url":"https://api.github.com/users/chosak","html_url":"https://github.com/chosak","followers_url":"https://api.github.com/users/chosak/followers","following_url":"https://api.github.com/users/chosak/following{/other_user}","gists_url":"https://api.github.com/users/chosak/gists{/gist_id}","starred_url":"https://api.github.com/users/chosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chosak/subscriptions","organizations_url":"https://api.github.com/users/chosak/orgs","repos_url":"https://api.github.com/users/chosak/repos","events_url":"https://api.github.com/users/chosak/events{/privacy}","received_events_url":"https://api.github.com/users/chosak/received_events","type":"User","site_admin":false},{"login":"willbarton","id":10562538,"avatar_url":"https://avatars.githubusercontent.com/u/10562538?v=3","gravatar_id":"","url":"https://api.github.com/users/willbarton","html_url":"https://github.com/willbarton","followers_url":"https://api.github.com/users/willbarton/followers","following_url":"https://api.github.com/users/willbarton/following{/other_user}","gists_url":"https://api.github.com/users/willbarton/gists{/gist_id}","starred_url":"https://api.github.com/users/willbarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willbarton/subscriptions","organizations_url":"https://api.github.com/users/willbarton/orgs","repos_url":"https://api.github.com/users/willbarton/repos","events_url":"https://api.github.com/users/willbarton/events{/privacy}","received_events_url":"https://api.github.com/users/willbarton/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411/commits","review_comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411/comments","review_comment_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2411/comments","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/9646ad03b4ae466ff3d535f7b839df1367bffeab","head":{"label":"cfpb:backend/abstract-form-block","ref":"backend/abstract-form-block","sha":"9646ad03b4ae466ff3d535f7b839df1367bffeab","user":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"repo":{"id":18852566,"name":"cfgov-refresh","full_name":"cfpb/cfgov-refresh","owner":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfpb/cfgov-refresh","description":"Django project that powers the redesigned consumerfinance.gov website.","fork":false,"url":"https://api.github.com/repos/cfpb/cfgov-refresh","forks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/forks","keys_url":"https://api.github.com/repos/cfpb/cfgov-refresh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfpb/cfgov-refresh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfpb/cfgov-refresh/teams","hooks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/hooks","issue_events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/events{/number}","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/events","assignees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/assignees{/user}","branches_url":"https://api.github.com/repos/cfpb/cfgov-refresh/branches{/branch}","tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/tags","blobs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/{sha}","languages_url":"https://api.github.com/repos/cfpb/cfgov-refresh/languages","stargazers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/stargazers","contributors_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contributors","subscribers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscribers","subscription_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscription","commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contents/{+path}","compare_url":"https://api.github.com/repos/cfpb/cfgov-refresh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfpb/cfgov-refresh/merges","archive_url":"https://api.github.com/repos/cfpb/cfgov-refresh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfpb/cfgov-refresh/downloads","issues_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues{/number}","pulls_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls{/number}","milestones_url":"https://api.github.com/repos/cfpb/cfgov-refresh/milestones{/number}","notifications_url":"https://api.github.com/repos/cfpb/cfgov-refresh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/labels{/name}","releases_url":"https://api.github.com/repos/cfpb/cfgov-refresh/releases{/id}","deployments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/deployments","created_at":"2014-04-16T19:22:03Z","updated_at":"2016-09-14T10:58:23Z","pushed_at":"2016-09-22T13:14:35Z","git_url":"git://github.com/cfpb/cfgov-refresh.git","ssh_url":"git@github.com:cfpb/cfgov-refresh.git","clone_url":"https://github.com/cfpb/cfgov-refresh.git","svn_url":"https://github.com/cfpb/cfgov-refresh","homepage":"http://www.consumerfinance.gov/","size":130133,"stargazers_count":71,"watchers_count":71,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":41,"mirror_url":null,"open_issues_count":104,"forks":41,"open_issues":104,"watchers":71,"default_branch":"master"}},"base":{"label":"cfpb:master","ref":"master","sha":"92a68ddb3e0b176392d608d749f29c3884652aa8","user":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"repo":{"id":18852566,"name":"cfgov-refresh","full_name":"cfpb/cfgov-refresh","owner":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfpb/cfgov-refresh","description":"Django project that powers the redesigned consumerfinance.gov website.","fork":false,"url":"https://api.github.com/repos/cfpb/cfgov-refresh","forks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/forks","keys_url":"https://api.github.com/repos/cfpb/cfgov-refresh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfpb/cfgov-refresh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfpb/cfgov-refresh/teams","hooks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/hooks","issue_events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/events{/number}","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/events","assignees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/assignees{/user}","branches_url":"https://api.github.com/repos/cfpb/cfgov-refresh/branches{/branch}","tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/tags","blobs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/{sha}","languages_url":"https://api.github.com/repos/cfpb/cfgov-refresh/languages","stargazers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/stargazers","contributors_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contributors","subscribers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscribers","subscription_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscription","commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contents/{+path}","compare_url":"https://api.github.com/repos/cfpb/cfgov-refresh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfpb/cfgov-refresh/merges","archive_url":"https://api.github.com/repos/cfpb/cfgov-refresh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfpb/cfgov-refresh/downloads","issues_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues{/number}","pulls_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls{/number}","milestones_url":"https://api.github.com/repos/cfpb/cfgov-refresh/milestones{/number}","notifications_url":"https://api.github.com/repos/cfpb/cfgov-refresh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/labels{/name}","releases_url":"https://api.github.com/repos/cfpb/cfgov-refresh/releases{/id}","deployments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/deployments","created_at":"2014-04-16T19:22:03Z","updated_at":"2016-09-14T10:58:23Z","pushed_at":"2016-09-22T13:14:35Z","git_url":"git://github.com/cfpb/cfgov-refresh.git","ssh_url":"git@github.com:cfpb/cfgov-refresh.git","clone_url":"https://github.com/cfpb/cfgov-refresh.git","svn_url":"https://github.com/cfpb/cfgov-refresh","homepage":"http://www.consumerfinance.gov/","size":130133,"stargazers_count":71,"watchers_count":71,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":41,"mirror_url":null,"open_issues_count":104,"forks":41,"open_issues":104,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411"},"html":{"href":"https://github.com/cfpb/cfgov-refresh/pull/2411"},"issue":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2411"},"comments":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2411/comments"},"review_comments":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411/comments"},"review_comment":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2411/commits"},"statuses":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/9646ad03b4ae466ff3d535f7b839df1367bffeab"}}}}
{"actor":{"display_login":"chosak"}}