{"action":"opened","number":238,"pull_request":{"url":"https://api.github.com/repos/PyGotham/pygotham/pulls/238","id":42311621,"html_url":"https://github.com/PyGotham/pygotham/pull/238","diff_url":"https://github.com/PyGotham/pygotham/pull/238.diff","patch_url":"https://github.com/PyGotham/pygotham/pull/238.patch","issue_url":"https://api.github.com/repos/PyGotham/pygotham/issues/238","number":238,"state":"open","locked":false,"title":"Add trailing slashes to routes","user":{"login":"jonafato","id":392720,"avatar_url":"https://avatars.githubusercontent.com/u/392720?v=3","gravatar_id":"","url":"https://api.github.com/users/jonafato","html_url":"https://github.com/jonafato","followers_url":"https://api.github.com/users/jonafato/followers","following_url":"https://api.github.com/users/jonafato/following{/other_user}","gists_url":"https://api.github.com/users/jonafato/gists{/gist_id}","starred_url":"https://api.github.com/users/jonafato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonafato/subscriptions","organizations_url":"https://api.github.com/users/jonafato/orgs","repos_url":"https://api.github.com/users/jonafato/repos","events_url":"https://api.github.com/users/jonafato/events{/privacy}","received_events_url":"https://api.github.com/users/jonafato/received_events","type":"User","site_admin":false},"body":"Rationale:\r\n\r\n- Conceptually, this makes more sense in most of the current use cases.\r\n  When using URLs like `/talks` and `/sponsors`, we typically refer to a\r\n  list of documents rather than a single document. If we think about\r\n  these as directories full of documents, a trailing slash should be\r\n  used.\r\n\r\n- Flask will redirect \"branch\" URLs missing their trailing slashes to\r\n  their canonical equivalents (e.g. `/talks` --> `/talks/`), but the same\r\n  is not true for the other direction (e.g. `/talks/` -/-> `/talks`) [0].\r\n  This behavior is also seen in other web frameworks and when dealing with\r\n  Unix files and directories.\r\n\r\n- From a more practical archival standpoint, this makes creating a\r\n  static backup of the site that can be served as a directory much\r\n  easier.\r\n\r\nA note on the change to frontend/__init__.py: Werkzeug raises a\r\nRequestRedirect exception to handle the strict_slashes redirect. An\r\nendpoint is not set until after the redirect happens, so the request\r\npreprocessor function that sets `g.current_event` will raise an exception\r\nif it attempts to use `None`.","created_at":"2015-08-13T03:14:13Z","updated_at":"2015-08-13T03:14:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PyGotham/pygotham/pulls/238/commits","review_comments_url":"https://api.github.com/repos/PyGotham/pygotham/pulls/238/comments","review_comment_url":"https://api.github.com/repos/PyGotham/pygotham/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PyGotham/pygotham/issues/238/comments","statuses_url":"https://api.github.com/repos/PyGotham/pygotham/statuses/ee6b795bf7efa1703243e3e14c68a9edd5db0232","head":{"label":"PyGotham:trailing-slashes","ref":"trailing-slashes","sha":"ee6b795bf7efa1703243e3e14c68a9edd5db0232","user":{"login":"PyGotham","id":1065982,"avatar_url":"https://avatars.githubusercontent.com/u/1065982?v=3","gravatar_id":"","url":"https://api.github.com/users/PyGotham","html_url":"https://github.com/PyGotham","followers_url":"https://api.github.com/users/PyGotham/followers","following_url":"https://api.github.com/users/PyGotham/following{/other_user}","gists_url":"https://api.github.com/users/PyGotham/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGotham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGotham/subscriptions","organizations_url":"https://api.github.com/users/PyGotham/orgs","repos_url":"https://api.github.com/users/PyGotham/repos","events_url":"https://api.github.com/users/PyGotham/events{/privacy}","received_events_url":"https://api.github.com/users/PyGotham/received_events","type":"Organization","site_admin":false},"repo":{"id":18300298,"name":"pygotham","full_name":"PyGotham/pygotham","owner":{"login":"PyGotham","id":1065982,"avatar_url":"https://avatars.githubusercontent.com/u/1065982?v=3","gravatar_id":"","url":"https://api.github.com/users/PyGotham","html_url":"https://github.com/PyGotham","followers_url":"https://api.github.com/users/PyGotham/followers","following_url":"https://api.github.com/users/PyGotham/following{/other_user}","gists_url":"https://api.github.com/users/PyGotham/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGotham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGotham/subscriptions","organizations_url":"https://api.github.com/users/PyGotham/orgs","repos_url":"https://api.github.com/users/PyGotham/repos","events_url":"https://api.github.com/users/PyGotham/events{/privacy}","received_events_url":"https://api.github.com/users/PyGotham/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PyGotham/pygotham","description":"Website for PyGotham","fork":false,"url":"https://api.github.com/repos/PyGotham/pygotham","forks_url":"https://api.github.com/repos/PyGotham/pygotham/forks","keys_url":"https://api.github.com/repos/PyGotham/pygotham/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGotham/pygotham/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGotham/pygotham/teams","hooks_url":"https://api.github.com/repos/PyGotham/pygotham/hooks","issue_events_url":"https://api.github.com/repos/PyGotham/pygotham/issues/events{/number}","events_url":"https://api.github.com/repos/PyGotham/pygotham/events","assignees_url":"https://api.github.com/repos/PyGotham/pygotham/assignees{/user}","branches_url":"https://api.github.com/repos/PyGotham/pygotham/branches{/branch}","tags_url":"https://api.github.com/repos/PyGotham/pygotham/tags","blobs_url":"https://api.github.com/repos/PyGotham/pygotham/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGotham/pygotham/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGotham/pygotham/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGotham/pygotham/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGotham/pygotham/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGotham/pygotham/languages","stargazers_url":"https://api.github.com/repos/PyGotham/pygotham/stargazers","contributors_url":"https://api.github.com/repos/PyGotham/pygotham/contributors","subscribers_url":"https://api.github.com/repos/PyGotham/pygotham/subscribers","subscription_url":"https://api.github.com/repos/PyGotham/pygotham/subscription","commits_url":"https://api.github.com/repos/PyGotham/pygotham/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGotham/pygotham/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGotham/pygotham/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGotham/pygotham/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGotham/pygotham/contents/{+path}","compare_url":"https://api.github.com/repos/PyGotham/pygotham/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGotham/pygotham/merges","archive_url":"https://api.github.com/repos/PyGotham/pygotham/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGotham/pygotham/downloads","issues_url":"https://api.github.com/repos/PyGotham/pygotham/issues{/number}","pulls_url":"https://api.github.com/repos/PyGotham/pygotham/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGotham/pygotham/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGotham/pygotham/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGotham/pygotham/labels{/name}","releases_url":"https://api.github.com/repos/PyGotham/pygotham/releases{/id}","created_at":"2014-03-31T16:42:14Z","updated_at":"2015-07-20T20:59:01Z","pushed_at":"2015-08-13T03:14:13Z","git_url":"git://github.com/PyGotham/pygotham.git","ssh_url":"git@github.com:PyGotham/pygotham.git","clone_url":"https://github.com/PyGotham/pygotham.git","svn_url":"https://github.com/PyGotham/pygotham","homepage":"http://pygotham.org","size":2185,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":10,"default_branch":"master"}},"base":{"label":"PyGotham:master","ref":"master","sha":"9cbd06fbf46155153a1889be5fa73a462a947d2f","user":{"login":"PyGotham","id":1065982,"avatar_url":"https://avatars.githubusercontent.com/u/1065982?v=3","gravatar_id":"","url":"https://api.github.com/users/PyGotham","html_url":"https://github.com/PyGotham","followers_url":"https://api.github.com/users/PyGotham/followers","following_url":"https://api.github.com/users/PyGotham/following{/other_user}","gists_url":"https://api.github.com/users/PyGotham/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGotham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGotham/subscriptions","organizations_url":"https://api.github.com/users/PyGotham/orgs","repos_url":"https://api.github.com/users/PyGotham/repos","events_url":"https://api.github.com/users/PyGotham/events{/privacy}","received_events_url":"https://api.github.com/users/PyGotham/received_events","type":"Organization","site_admin":false},"repo":{"id":18300298,"name":"pygotham","full_name":"PyGotham/pygotham","owner":{"login":"PyGotham","id":1065982,"avatar_url":"https://avatars.githubusercontent.com/u/1065982?v=3","gravatar_id":"","url":"https://api.github.com/users/PyGotham","html_url":"https://github.com/PyGotham","followers_url":"https://api.github.com/users/PyGotham/followers","following_url":"https://api.github.com/users/PyGotham/following{/other_user}","gists_url":"https://api.github.com/users/PyGotham/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGotham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGotham/subscriptions","organizations_url":"https://api.github.com/users/PyGotham/orgs","repos_url":"https://api.github.com/users/PyGotham/repos","events_url":"https://api.github.com/users/PyGotham/events{/privacy}","received_events_url":"https://api.github.com/users/PyGotham/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PyGotham/pygotham","description":"Website for PyGotham","fork":false,"url":"https://api.github.com/repos/PyGotham/pygotham","forks_url":"https://api.github.com/repos/PyGotham/pygotham/forks","keys_url":"https://api.github.com/repos/PyGotham/pygotham/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGotham/pygotham/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGotham/pygotham/teams","hooks_url":"https://api.github.com/repos/PyGotham/pygotham/hooks","issue_events_url":"https://api.github.com/repos/PyGotham/pygotham/issues/events{/number}","events_url":"https://api.github.com/repos/PyGotham/pygotham/events","assignees_url":"https://api.github.com/repos/PyGotham/pygotham/assignees{/user}","branches_url":"https://api.github.com/repos/PyGotham/pygotham/branches{/branch}","tags_url":"https://api.github.com/repos/PyGotham/pygotham/tags","blobs_url":"https://api.github.com/repos/PyGotham/pygotham/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGotham/pygotham/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGotham/pygotham/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGotham/pygotham/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGotham/pygotham/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGotham/pygotham/languages","stargazers_url":"https://api.github.com/repos/PyGotham/pygotham/stargazers","contributors_url":"https://api.github.com/repos/PyGotham/pygotham/contributors","subscribers_url":"https://api.github.com/repos/PyGotham/pygotham/subscribers","subscription_url":"https://api.github.com/repos/PyGotham/pygotham/subscription","commits_url":"https://api.github.com/repos/PyGotham/pygotham/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGotham/pygotham/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGotham/pygotham/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGotham/pygotham/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGotham/pygotham/contents/{+path}","compare_url":"https://api.github.com/repos/PyGotham/pygotham/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGotham/pygotham/merges","archive_url":"https://api.github.com/repos/PyGotham/pygotham/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGotham/pygotham/downloads","issues_url":"https://api.github.com/repos/PyGotham/pygotham/issues{/number}","pulls_url":"https://api.github.com/repos/PyGotham/pygotham/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGotham/pygotham/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGotham/pygotham/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGotham/pygotham/labels{/name}","releases_url":"https://api.github.com/repos/PyGotham/pygotham/releases{/id}","created_at":"2014-03-31T16:42:14Z","updated_at":"2015-07-20T20:59:01Z","pushed_at":"2015-08-13T03:14:13Z","git_url":"git://github.com/PyGotham/pygotham.git","ssh_url":"git@github.com:PyGotham/pygotham.git","clone_url":"https://github.com/PyGotham/pygotham.git","svn_url":"https://github.com/PyGotham/pygotham","homepage":"http://pygotham.org","size":2185,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PyGotham/pygotham/pulls/238"},"html":{"href":"https://github.com/PyGotham/pygotham/pull/238"},"issue":{"href":"https://api.github.com/repos/PyGotham/pygotham/issues/238"},"comments":{"href":"https://api.github.com/repos/PyGotham/pygotham/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/PyGotham/pygotham/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/PyGotham/pygotham/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PyGotham/pygotham/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/PyGotham/pygotham/statuses/ee6b795bf7efa1703243e3e14c68a9edd5db0232"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":21,"deletions":21,"changed_files":7}}