{"action":"created","comment":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments/73134091","id":73134091,"diff_hunk":"@@ -122,8 +181,16 @@ def display(request, pdf=False):\n             'range_end':range_end,\n         })\n \n-        if pdf and PDFreactor:\n-            return pdf_response(request, context)\n+        if pdf:\n+            template_name = 'about-us/the-bureau/leadership-calendar/print/index.html'\n+            if PDFreactor:\n+                return pdf_response(request, context)","path":"cfgov/cal/views.py","position":141,"original_position":125,"commit_id":"7436a9bcc457106b52242f8ba888c4d225a79970","original_commit_id":"700344348349aed56e12f74eba5247a407f55656","user":{"login":"sebworks","id":1696212,"avatar_url":"https://avatars.githubusercontent.com/u/1696212?v=3","gravatar_id":"","url":"https://api.github.com/users/sebworks","html_url":"https://github.com/sebworks","followers_url":"https://api.github.com/users/sebworks/followers","following_url":"https://api.github.com/users/sebworks/following{/other_user}","gists_url":"https://api.github.com/users/sebworks/gists{/gist_id}","starred_url":"https://api.github.com/users/sebworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebworks/subscriptions","organizations_url":"https://api.github.com/users/sebworks/orgs","repos_url":"https://api.github.com/users/sebworks/repos","events_url":"https://api.github.com/users/sebworks/events{/privacy}","received_events_url":"https://api.github.com/users/sebworks/received_events","type":"User","site_admin":false},"body":"Hmmmm, I'm not sure on this issue . An alternative approach might be to just manually create the PDF. \r\n\r\nhttps://blog.idrsolutions.com/2013/01/understanding-the-pdf-file-format-overview/#helloworld","created_at":"2016-08-02T10:51:50Z","updated_at":"2016-08-02T10:51:50Z","html_url":"https://github.com/cfpb/cfgov-refresh/pull/2263#discussion_r73134091","pull_request_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263","_links":{"self":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments/73134091"},"html":{"href":"https://github.com/cfpb/cfgov-refresh/pull/2263#discussion_r73134091"},"pull_request":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263"}}},"pull_request":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263","id":79431010,"html_url":"https://github.com/cfpb/cfgov-refresh/pull/2263","diff_url":"https://github.com/cfpb/cfgov-refresh/pull/2263.diff","patch_url":"https://github.com/cfpb/cfgov-refresh/pull/2263.patch","issue_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2263","number":2263,"state":"open","locked":false,"title":"Fixing error notification on the Leadership PDF Calendar","user":{"login":"sebworks","id":1696212,"avatar_url":"https://avatars.githubusercontent.com/u/1696212?v=3","gravatar_id":"","url":"https://api.github.com/users/sebworks","html_url":"https://github.com/sebworks","followers_url":"https://api.github.com/users/sebworks/followers","following_url":"https://api.github.com/users/sebworks/following{/other_user}","gists_url":"https://api.github.com/users/sebworks/gists{/gist_id}","starred_url":"https://api.github.com/users/sebworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebworks/subscriptions","organizations_url":"https://api.github.com/users/sebworks/orgs","repos_url":"https://api.github.com/users/sebworks/repos","events_url":"https://api.github.com/users/sebworks/events{/privacy}","received_events_url":"https://api.github.com/users/sebworks/received_events","type":"User","site_admin":false},"body":"Fixing error notification on the Leadership PDF Calendar\r\n\r\n**This PR contains commits from https://github.com/cfpb/cfgov-refresh/pull/2250**\r\n\r\n## Changes\r\n\r\n- Updated `cfgov/v1/util/util.py` to make the error message dynamic through string interpolation. \r\n- Updated `cfgov/jinja2/v1/about-us/the-bureau/leadership-calendar/print/index.html` to fix issue with logic and formatting. \r\n- Updated `cfgov/cal/views.py` to add validation for the `CalendarPDFForm1`.\r\n- Updated `cfgov/jinja2/v1/_includes/macros/filters.html` to fix issue rendering the notification.\r\n\r\n\r\n## Testing\r\n\r\n- Disable Javascript in the browser.\r\n- Visit the `http://localhost:8000/about-us/the-bureau/leadership-calendar/` page. \r\n- Click the `Download PDF` button. You should see an error notification once redirected. \r\n- Enter in `123456` in the `From :` field. Click the `Download PDF` button. You should see an error notification once redirected. \r\n\r\n## Review\r\n\r\n- @richaagarwal \r\n- @chosak \r\n- @kurtrwall \r\n\r\n## Screenshots\r\n\r\n<img width=\"906\" alt=\"screen shot 2016-07-29 at 5 50 56 pm\" src=\"https://cloud.githubusercontent.com/assets/1696212/17264461/117c370c-55b5-11e6-902c-e7110127b830.png\">\r\n\r\n\r\n## Notes\r\n\r\n- Most of the code was contained in https://github.com/cfpb/cfgov-refresh/blob/master/cfgov/v1/forms.py. It probably makes sense to delete that code at this time, since much of it has been migrated to views.py. \r\n\r\n- I am removing all query-string parameters when redirecting. It might make sense to add back the valid parameters. \r\n\r\n- There are two forms on the leadership-calendar page sharing the same query-string parameters. We might want to consider an alternative approach.\r\n\r\n## Todos\r\n\r\n- Write Tests. \r\n\r\n## Checklist\r\n\r\n* [ ] Changes are limited to a single goal (no scope creep)\r\n* [ ] 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* [ ] Passes all existing automated tests\r\n* [ ] New functions include new tests\r\n* [ ] New functions are documented (with a description, list of inputs, and expected output)\r\n* [ ] Placeholder code is flagged\r\n* [ ] Visually tested in supported browsers and devices\r\n* [ ] Project documentation has been updated (including the \"Unreleased\" section of the CHANGELOG)\r\n","created_at":"2016-07-29T22:00:42Z","updated_at":"2016-08-02T10:51:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9626c148ede8ec83d00d6cfb81baa754484f3843","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263/commits","review_comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263/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/2263/comments","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/7436a9bcc457106b52242f8ba888c4d225a79970","head":{"label":"cfpb:error_notification_leadership_calendar","ref":"error_notification_leadership_calendar","sha":"7436a9bcc457106b52242f8ba888c4d225a79970","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-07-29T20:20:56Z","pushed_at":"2016-08-02T10:36:48Z","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":127049,"stargazers_count":67,"watchers_count":67,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":97,"forks":35,"open_issues":97,"watchers":67,"default_branch":"master"}},"base":{"label":"cfpb:master","ref":"master","sha":"451615ff8eebdc0e6b6e4a2717b80c8cdc1ea1e5","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-07-29T20:20:56Z","pushed_at":"2016-08-02T10:36:48Z","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":127049,"stargazers_count":67,"watchers_count":67,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":97,"forks":35,"open_issues":97,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263"},"html":{"href":"https://github.com/cfpb/cfgov-refresh/pull/2263"},"issue":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2263"},"comments":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2263/comments"},"review_comments":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2263/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/2263/commits"},"statuses":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/7436a9bcc457106b52242f8ba888c4d225a79970"}}}}
{"actor":{"display_login":"sebworks"}}