{"action":"created","comment":{"url":"https://api.github.com/repos/divio/django-shop/pulls/comments/29035146","id":29035146,"diff_hunk":"@@ -248,7 +248,6 @@ def get(self, request, *args, **kwargs):\n         return super(OrderConfirmView, self).get(request, *args, **kwargs)\n \n     def get_redirect_url(self, **kwargs):\n-        self.url = reverse(self.url_name)","path":"shop/views/checkout.py","position":13,"original_position":13,"commit_id":"0c38e77a9087ec6725162cb9496ebd92245a8126","original_commit_id":"0c38e77a9087ec6725162cb9496ebd92245a8126","user":{"login":"jrief","id":1132472,"avatar_url":"https://avatars.githubusercontent.com/u/1132472?v=3","gravatar_id":"","url":"https://api.github.com/users/jrief","html_url":"https://github.com/jrief","followers_url":"https://api.github.com/users/jrief/followers","following_url":"https://api.github.com/users/jrief/following{/other_user}","gists_url":"https://api.github.com/users/jrief/gists{/gist_id}","starred_url":"https://api.github.com/users/jrief/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrief/subscriptions","organizations_url":"https://api.github.com/users/jrief/orgs","repos_url":"https://api.github.com/users/jrief/repos","events_url":"https://api.github.com/users/jrief/events{/privacy}","received_events_url":"https://api.github.com/users/jrief/received_events","type":"User","site_admin":false},"body":"which function then does the URL ``reverse``-sion?","created_at":"2015-04-24T09:21:28Z","updated_at":"2015-04-24T09:21:28Z","html_url":"https://github.com/divio/django-shop/pull/286#discussion_r29035146","pull_request_url":"https://api.github.com/repos/divio/django-shop/pulls/286","_links":{"self":{"href":"https://api.github.com/repos/divio/django-shop/pulls/comments/29035146"},"html":{"href":"https://github.com/divio/django-shop/pull/286#discussion_r29035146"},"pull_request":{"href":"https://api.github.com/repos/divio/django-shop/pulls/286"}}},"pull_request":{"url":"https://api.github.com/repos/divio/django-shop/pulls/286","id":34023286,"html_url":"https://github.com/divio/django-shop/pull/286","diff_url":"https://github.com/divio/django-shop/pull/286.diff","patch_url":"https://github.com/divio/django-shop/pull/286.patch","issue_url":"https://api.github.com/repos/divio/django-shop/issues/286","number":286,"state":"open","locked":false,"title":"In OrderConfirmView, use self.pattern_name instead of self.url","user":{"login":"sebleblanc","id":426033,"avatar_url":"https://avatars.githubusercontent.com/u/426033?v=3","gravatar_id":"","url":"https://api.github.com/users/sebleblanc","html_url":"https://github.com/sebleblanc","followers_url":"https://api.github.com/users/sebleblanc/followers","following_url":"https://api.github.com/users/sebleblanc/following{/other_user}","gists_url":"https://api.github.com/users/sebleblanc/gists{/gist_id}","starred_url":"https://api.github.com/users/sebleblanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebleblanc/subscriptions","organizations_url":"https://api.github.com/users/sebleblanc/orgs","repos_url":"https://api.github.com/users/sebleblanc/repos","events_url":"https://api.github.com/users/sebleblanc/events{/privacy}","received_events_url":"https://api.github.com/users/sebleblanc/received_events","type":"User","site_admin":false},"body":"This fixes the OrderConfirmView to use `pattern_name` instead of `self.url`.\r\nThe reason behind this is that Django will apply percent-sign formatting on the `url` attribute, and if it contains special characters, Python will crash on this. See this:\r\n\r\n    # I have accented letters in my URLs. I use \"reverse\" to fetch it, thus it contains URL-escaped characters.\r\n    # Inside my view;\r\n    class MyView(RedirectView)\r\n        url = reverse('my-other-view') # returns '/r%C3%A9vision/', the URL-escaped form of \"révision\"\r\n\r\n\r\n    # from django/views/generic/base.py:170\r\n    self.get_redirect_url():\r\n        ...\r\n        if self.url:\r\n            url = self.url % kwargs # Fails hard because Python cannot figure out how to handle the invalid format specifiers (%C and %A)","created_at":"2015-04-24T07:01:34Z","updated_at":"2015-04-24T09:21:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"113678ff9616fb20f654ac312be0c7b3a7805967","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/divio/django-shop/pulls/286/commits","review_comments_url":"https://api.github.com/repos/divio/django-shop/pulls/286/comments","review_comment_url":"https://api.github.com/repos/divio/django-shop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/divio/django-shop/issues/286/comments","statuses_url":"https://api.github.com/repos/divio/django-shop/statuses/0c38e77a9087ec6725162cb9496ebd92245a8126","head":{"label":"sebleblanc:orderconfirmview","ref":"orderconfirmview","sha":"0c38e77a9087ec6725162cb9496ebd92245a8126","user":{"login":"sebleblanc","id":426033,"avatar_url":"https://avatars.githubusercontent.com/u/426033?v=3","gravatar_id":"","url":"https://api.github.com/users/sebleblanc","html_url":"https://github.com/sebleblanc","followers_url":"https://api.github.com/users/sebleblanc/followers","following_url":"https://api.github.com/users/sebleblanc/following{/other_user}","gists_url":"https://api.github.com/users/sebleblanc/gists{/gist_id}","starred_url":"https://api.github.com/users/sebleblanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebleblanc/subscriptions","organizations_url":"https://api.github.com/users/sebleblanc/orgs","repos_url":"https://api.github.com/users/sebleblanc/repos","events_url":"https://api.github.com/users/sebleblanc/events{/privacy}","received_events_url":"https://api.github.com/users/sebleblanc/received_events","type":"User","site_admin":false},"repo":{"id":34499806,"name":"django-shop","full_name":"sebleblanc/django-shop","owner":{"login":"sebleblanc","id":426033,"avatar_url":"https://avatars.githubusercontent.com/u/426033?v=3","gravatar_id":"","url":"https://api.github.com/users/sebleblanc","html_url":"https://github.com/sebleblanc","followers_url":"https://api.github.com/users/sebleblanc/followers","following_url":"https://api.github.com/users/sebleblanc/following{/other_user}","gists_url":"https://api.github.com/users/sebleblanc/gists{/gist_id}","starred_url":"https://api.github.com/users/sebleblanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebleblanc/subscriptions","organizations_url":"https://api.github.com/users/sebleblanc/orgs","repos_url":"https://api.github.com/users/sebleblanc/repos","events_url":"https://api.github.com/users/sebleblanc/events{/privacy}","received_events_url":"https://api.github.com/users/sebleblanc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sebleblanc/django-shop","description":"A Django based shop system","fork":true,"url":"https://api.github.com/repos/sebleblanc/django-shop","forks_url":"https://api.github.com/repos/sebleblanc/django-shop/forks","keys_url":"https://api.github.com/repos/sebleblanc/django-shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sebleblanc/django-shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sebleblanc/django-shop/teams","hooks_url":"https://api.github.com/repos/sebleblanc/django-shop/hooks","issue_events_url":"https://api.github.com/repos/sebleblanc/django-shop/issues/events{/number}","events_url":"https://api.github.com/repos/sebleblanc/django-shop/events","assignees_url":"https://api.github.com/repos/sebleblanc/django-shop/assignees{/user}","branches_url":"https://api.github.com/repos/sebleblanc/django-shop/branches{/branch}","tags_url":"https://api.github.com/repos/sebleblanc/django-shop/tags","blobs_url":"https://api.github.com/repos/sebleblanc/django-shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sebleblanc/django-shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sebleblanc/django-shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/sebleblanc/django-shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sebleblanc/django-shop/statuses/{sha}","languages_url":"https://api.github.com/repos/sebleblanc/django-shop/languages","stargazers_url":"https://api.github.com/repos/sebleblanc/django-shop/stargazers","contributors_url":"https://api.github.com/repos/sebleblanc/django-shop/contributors","subscribers_url":"https://api.github.com/repos/sebleblanc/django-shop/subscribers","subscription_url":"https://api.github.com/repos/sebleblanc/django-shop/subscription","commits_url":"https://api.github.com/repos/sebleblanc/django-shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/sebleblanc/django-shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/sebleblanc/django-shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/sebleblanc/django-shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/sebleblanc/django-shop/contents/{+path}","compare_url":"https://api.github.com/repos/sebleblanc/django-shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sebleblanc/django-shop/merges","archive_url":"https://api.github.com/repos/sebleblanc/django-shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sebleblanc/django-shop/downloads","issues_url":"https://api.github.com/repos/sebleblanc/django-shop/issues{/number}","pulls_url":"https://api.github.com/repos/sebleblanc/django-shop/pulls{/number}","milestones_url":"https://api.github.com/repos/sebleblanc/django-shop/milestones{/number}","notifications_url":"https://api.github.com/repos/sebleblanc/django-shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sebleblanc/django-shop/labels{/name}","releases_url":"https://api.github.com/repos/sebleblanc/django-shop/releases{/id}","created_at":"2015-04-24T05:30:13Z","updated_at":"2015-04-24T05:30:13Z","pushed_at":"2015-04-24T06:58:34Z","git_url":"git://github.com/sebleblanc/django-shop.git","ssh_url":"git@github.com:sebleblanc/django-shop.git","clone_url":"https://github.com/sebleblanc/django-shop.git","svn_url":"https://github.com/sebleblanc/django-shop","homepage":"http://www.django-shop.org","size":3024,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"divio:master","ref":"master","sha":"396c0d1246bcf6045e74db1805d638480bd7562a","user":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"repo":{"id":1094430,"name":"django-shop","full_name":"divio/django-shop","owner":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/divio/django-shop","description":"A Django based shop system","fork":false,"url":"https://api.github.com/repos/divio/django-shop","forks_url":"https://api.github.com/repos/divio/django-shop/forks","keys_url":"https://api.github.com/repos/divio/django-shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divio/django-shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divio/django-shop/teams","hooks_url":"https://api.github.com/repos/divio/django-shop/hooks","issue_events_url":"https://api.github.com/repos/divio/django-shop/issues/events{/number}","events_url":"https://api.github.com/repos/divio/django-shop/events","assignees_url":"https://api.github.com/repos/divio/django-shop/assignees{/user}","branches_url":"https://api.github.com/repos/divio/django-shop/branches{/branch}","tags_url":"https://api.github.com/repos/divio/django-shop/tags","blobs_url":"https://api.github.com/repos/divio/django-shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divio/django-shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divio/django-shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/divio/django-shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divio/django-shop/statuses/{sha}","languages_url":"https://api.github.com/repos/divio/django-shop/languages","stargazers_url":"https://api.github.com/repos/divio/django-shop/stargazers","contributors_url":"https://api.github.com/repos/divio/django-shop/contributors","subscribers_url":"https://api.github.com/repos/divio/django-shop/subscribers","subscription_url":"https://api.github.com/repos/divio/django-shop/subscription","commits_url":"https://api.github.com/repos/divio/django-shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/divio/django-shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/divio/django-shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/divio/django-shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/divio/django-shop/contents/{+path}","compare_url":"https://api.github.com/repos/divio/django-shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divio/django-shop/merges","archive_url":"https://api.github.com/repos/divio/django-shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divio/django-shop/downloads","issues_url":"https://api.github.com/repos/divio/django-shop/issues{/number}","pulls_url":"https://api.github.com/repos/divio/django-shop/pulls{/number}","milestones_url":"https://api.github.com/repos/divio/django-shop/milestones{/number}","notifications_url":"https://api.github.com/repos/divio/django-shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divio/django-shop/labels{/name}","releases_url":"https://api.github.com/repos/divio/django-shop/releases{/id}","created_at":"2010-11-19T11:15:48Z","updated_at":"2015-04-20T15:25:11Z","pushed_at":"2015-04-24T07:01:35Z","git_url":"git://github.com/divio/django-shop.git","ssh_url":"git@github.com:divio/django-shop.git","clone_url":"https://github.com/divio/django-shop.git","svn_url":"https://github.com/divio/django-shop","homepage":"http://www.django-shop.org","size":3024,"stargazers_count":899,"watchers_count":899,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":354,"mirror_url":null,"open_issues_count":53,"forks":354,"open_issues":53,"watchers":899,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/divio/django-shop/pulls/286"},"html":{"href":"https://github.com/divio/django-shop/pull/286"},"issue":{"href":"https://api.github.com/repos/divio/django-shop/issues/286"},"comments":{"href":"https://api.github.com/repos/divio/django-shop/issues/286/comments"},"review_comments":{"href":"https://api.github.com/repos/divio/django-shop/pulls/286/comments"},"review_comment":{"href":"https://api.github.com/repos/divio/django-shop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/divio/django-shop/pulls/286/commits"},"statuses":{"href":"https://api.github.com/repos/divio/django-shop/statuses/0c38e77a9087ec6725162cb9496ebd92245a8126"}}}}