{"action":"created","comment":{"url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/comments/34929427","id":34929427,"diff_hunk":"@@ -10,6 +10,16 @@\n urlpatterns = patterns('',\n     url(r'^$', FaqByCategoryListView.as_view(), name='faq-category-list'),\n     url(\n+        r'^(?P<category_pk>[0-9]+)-(?P<category_slug>[-\\w]+)/$',","path":"aldryn_faq/urls.py","position":4,"original_position":4,"commit_id":"ec202cdf3c4eb9c33e307a4d3ec2f6851a1dda80","original_commit_id":"ec202cdf3c4eb9c33e307a4d3ec2f6851a1dda80","user":{"login":"mkoistinen","id":615759,"avatar_url":"https://avatars.githubusercontent.com/u/615759?v=3","gravatar_id":"","url":"https://api.github.com/users/mkoistinen","html_url":"https://github.com/mkoistinen","followers_url":"https://api.github.com/users/mkoistinen/followers","following_url":"https://api.github.com/users/mkoistinen/following{/other_user}","gists_url":"https://api.github.com/users/mkoistinen/gists{/gist_id}","starred_url":"https://api.github.com/users/mkoistinen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkoistinen/subscriptions","organizations_url":"https://api.github.com/users/mkoistinen/orgs","repos_url":"https://api.github.com/users/mkoistinen/repos","events_url":"https://api.github.com/users/mkoistinen/events{/privacy}","received_events_url":"https://api.github.com/users/mkoistinen/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-07-17T20:46:05Z","updated_at":"2015-07-17T20:46:05Z","html_url":"https://github.com/aldryn/aldryn-faq/pull/99#discussion_r34929427","pull_request_url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/comments/34929427"},"html":{"href":"https://github.com/aldryn/aldryn-faq/pull/99#discussion_r34929427"},"pull_request":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99","id":39968744,"html_url":"https://github.com/aldryn/aldryn-faq/pull/99","diff_url":"https://github.com/aldryn/aldryn-faq/pull/99.diff","patch_url":"https://github.com/aldryn/aldryn-faq/pull/99.patch","issue_url":"https://api.github.com/repos/aldryn/aldryn-faq/issues/99","number":99,"state":"open","locked":false,"title":"adds working version of fallbacks","user":{"login":"czpython","id":994951,"avatar_url":"https://avatars.githubusercontent.com/u/994951?v=3","gravatar_id":"","url":"https://api.github.com/users/czpython","html_url":"https://github.com/czpython","followers_url":"https://api.github.com/users/czpython/followers","following_url":"https://api.github.com/users/czpython/following{/other_user}","gists_url":"https://api.github.com/users/czpython/gists{/gist_id}","starred_url":"https://api.github.com/users/czpython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czpython/subscriptions","organizations_url":"https://api.github.com/users/czpython/orgs","repos_url":"https://api.github.com/users/czpython/repos","events_url":"https://api.github.com/users/czpython/events{/privacy}","received_events_url":"https://api.github.com/users/czpython/received_events","type":"User","site_admin":false},"body":"**New url format**\r\n\r\nIn order to correctly support fallbacks, we needed to rethink the current url format.\r\n\r\nCurrently, the url formats are:\r\n\r\n*/en/faq/{category_slug}/*\r\n*/en/faq/{category_slug}/{question_id}/*\r\n\r\nThis format can cause problems when fallbacks are enabled, for example:\r\n\r\n**Category 1 (en & fr)**\r\n*/en/faq/queue/*\r\n*/fr/faq/file/*\r\n\r\n**Category 2 (en)**\r\n*/en/faq/file/*\r\n\r\nIf a user visits ```/en/faq/file/```, category 2 will be served.\r\nThis is expected because it's an exact match of it's slug, if the user uses the language chooser\r\nto go to the french version of this category (with fallbacks) the url will be ```/fr/faq/file/``` which is correct in syntax **but** when visited will cause Category 1 to be rendered because it's an exact match of it's french slug.\r\nThis can be quite confusing to users and so would not work for us.\r\n\r\nSo we've changed the url formats to:\r\n\r\n*/en/faq/{category_id}-{category_slug}/*\r\n*/en/faq/{category_id}-{category_slug}/{question_id}/*\r\n\r\nthis would then allow us to target a specific category when building it's url using the language chooser.\r\n\r\nBreaking backwards compatibility is not an option, so with this in mind, we've made sure that the old urls will resolve to it's new format and return an http permanent redirect.\r\n\r\n**Fallback Scenarios**\r\n\r\n**Category 1 (en & de)**\r\n*/en/faq/category-1-en/*\r\n*/de/faq/category-1-de/*\r\n\r\nIf user requests ```/en/faq/category-1-de/``` then he will be redirected to ```/en/faq/category-1-en/```\r\nif user requests ```/en/faq/category-1-de/10/``` then he will be redirected to ```/en/faq/category-1-en/10/```\r\n\r\n**Category 2 (de)**\r\n*/de/faq/category-1-de/*\r\n\r\nIf user requests ```/en/faq/category-1-de/``` then he will stay in this page as long as fallbacks are enabled, otherwise a 404 will be raised.\r\nif user requests ```/en/faq/category-1-de/10/``` then he will stay in this page then he will stay in this page as long as fallbacks are enabled, otherwise a 404 will be raised.\r\n","created_at":"2015-07-14T22:08:59Z","updated_at":"2015-07-17T20:46:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8270bc2bb36e10d0c711e041f1e6d2f9f379272","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99/commits","review_comments_url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99/comments","review_comment_url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aldryn/aldryn-faq/issues/99/comments","statuses_url":"https://api.github.com/repos/aldryn/aldryn-faq/statuses/ec202cdf3c4eb9c33e307a4d3ec2f6851a1dda80","head":{"label":"czpython:feature/translation-fallbacks","ref":"feature/translation-fallbacks","sha":"ec202cdf3c4eb9c33e307a4d3ec2f6851a1dda80","user":{"login":"czpython","id":994951,"avatar_url":"https://avatars.githubusercontent.com/u/994951?v=3","gravatar_id":"","url":"https://api.github.com/users/czpython","html_url":"https://github.com/czpython","followers_url":"https://api.github.com/users/czpython/followers","following_url":"https://api.github.com/users/czpython/following{/other_user}","gists_url":"https://api.github.com/users/czpython/gists{/gist_id}","starred_url":"https://api.github.com/users/czpython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czpython/subscriptions","organizations_url":"https://api.github.com/users/czpython/orgs","repos_url":"https://api.github.com/users/czpython/repos","events_url":"https://api.github.com/users/czpython/events{/privacy}","received_events_url":"https://api.github.com/users/czpython/received_events","type":"User","site_admin":false},"repo":{"id":39090759,"name":"aldryn-faq","full_name":"czpython/aldryn-faq","owner":{"login":"czpython","id":994951,"avatar_url":"https://avatars.githubusercontent.com/u/994951?v=3","gravatar_id":"","url":"https://api.github.com/users/czpython","html_url":"https://github.com/czpython","followers_url":"https://api.github.com/users/czpython/followers","following_url":"https://api.github.com/users/czpython/following{/other_user}","gists_url":"https://api.github.com/users/czpython/gists{/gist_id}","starred_url":"https://api.github.com/users/czpython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czpython/subscriptions","organizations_url":"https://api.github.com/users/czpython/orgs","repos_url":"https://api.github.com/users/czpython/repos","events_url":"https://api.github.com/users/czpython/events{/privacy}","received_events_url":"https://api.github.com/users/czpython/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/czpython/aldryn-faq","description":"Add questions and answers for Aldryn and django CMS – part of the Essential Addons.","fork":true,"url":"https://api.github.com/repos/czpython/aldryn-faq","forks_url":"https://api.github.com/repos/czpython/aldryn-faq/forks","keys_url":"https://api.github.com/repos/czpython/aldryn-faq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/czpython/aldryn-faq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/czpython/aldryn-faq/teams","hooks_url":"https://api.github.com/repos/czpython/aldryn-faq/hooks","issue_events_url":"https://api.github.com/repos/czpython/aldryn-faq/issues/events{/number}","events_url":"https://api.github.com/repos/czpython/aldryn-faq/events","assignees_url":"https://api.github.com/repos/czpython/aldryn-faq/assignees{/user}","branches_url":"https://api.github.com/repos/czpython/aldryn-faq/branches{/branch}","tags_url":"https://api.github.com/repos/czpython/aldryn-faq/tags","blobs_url":"https://api.github.com/repos/czpython/aldryn-faq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/czpython/aldryn-faq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/czpython/aldryn-faq/git/refs{/sha}","trees_url":"https://api.github.com/repos/czpython/aldryn-faq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/czpython/aldryn-faq/statuses/{sha}","languages_url":"https://api.github.com/repos/czpython/aldryn-faq/languages","stargazers_url":"https://api.github.com/repos/czpython/aldryn-faq/stargazers","contributors_url":"https://api.github.com/repos/czpython/aldryn-faq/contributors","subscribers_url":"https://api.github.com/repos/czpython/aldryn-faq/subscribers","subscription_url":"https://api.github.com/repos/czpython/aldryn-faq/subscription","commits_url":"https://api.github.com/repos/czpython/aldryn-faq/commits{/sha}","git_commits_url":"https://api.github.com/repos/czpython/aldryn-faq/git/commits{/sha}","comments_url":"https://api.github.com/repos/czpython/aldryn-faq/comments{/number}","issue_comment_url":"https://api.github.com/repos/czpython/aldryn-faq/issues/comments{/number}","contents_url":"https://api.github.com/repos/czpython/aldryn-faq/contents/{+path}","compare_url":"https://api.github.com/repos/czpython/aldryn-faq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/czpython/aldryn-faq/merges","archive_url":"https://api.github.com/repos/czpython/aldryn-faq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/czpython/aldryn-faq/downloads","issues_url":"https://api.github.com/repos/czpython/aldryn-faq/issues{/number}","pulls_url":"https://api.github.com/repos/czpython/aldryn-faq/pulls{/number}","milestones_url":"https://api.github.com/repos/czpython/aldryn-faq/milestones{/number}","notifications_url":"https://api.github.com/repos/czpython/aldryn-faq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/czpython/aldryn-faq/labels{/name}","releases_url":"https://api.github.com/repos/czpython/aldryn-faq/releases{/id}","created_at":"2015-07-14T17:43:49Z","updated_at":"2015-07-14T17:43:49Z","pushed_at":"2015-07-17T19:58:58Z","git_url":"git://github.com/czpython/aldryn-faq.git","ssh_url":"git@github.com:czpython/aldryn-faq.git","clone_url":"https://github.com/czpython/aldryn-faq.git","svn_url":"https://github.com/czpython/aldryn-faq","homepage":"http://www.aldryn.com/en/marketplace/aldryn-faq/","size":1398,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"aldryn:master","ref":"master","sha":"ffaaf8c31a2290c536ef996d21e14173b2ddd157","user":{"login":"aldryn","id":4201738,"avatar_url":"https://avatars.githubusercontent.com/u/4201738?v=3","gravatar_id":"","url":"https://api.github.com/users/aldryn","html_url":"https://github.com/aldryn","followers_url":"https://api.github.com/users/aldryn/followers","following_url":"https://api.github.com/users/aldryn/following{/other_user}","gists_url":"https://api.github.com/users/aldryn/gists{/gist_id}","starred_url":"https://api.github.com/users/aldryn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldryn/subscriptions","organizations_url":"https://api.github.com/users/aldryn/orgs","repos_url":"https://api.github.com/users/aldryn/repos","events_url":"https://api.github.com/users/aldryn/events{/privacy}","received_events_url":"https://api.github.com/users/aldryn/received_events","type":"Organization","site_admin":false},"repo":{"id":12153395,"name":"aldryn-faq","full_name":"aldryn/aldryn-faq","owner":{"login":"aldryn","id":4201738,"avatar_url":"https://avatars.githubusercontent.com/u/4201738?v=3","gravatar_id":"","url":"https://api.github.com/users/aldryn","html_url":"https://github.com/aldryn","followers_url":"https://api.github.com/users/aldryn/followers","following_url":"https://api.github.com/users/aldryn/following{/other_user}","gists_url":"https://api.github.com/users/aldryn/gists{/gist_id}","starred_url":"https://api.github.com/users/aldryn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldryn/subscriptions","organizations_url":"https://api.github.com/users/aldryn/orgs","repos_url":"https://api.github.com/users/aldryn/repos","events_url":"https://api.github.com/users/aldryn/events{/privacy}","received_events_url":"https://api.github.com/users/aldryn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aldryn/aldryn-faq","description":"Add questions and answers for Aldryn and django CMS – part of the Essential Addons.","fork":false,"url":"https://api.github.com/repos/aldryn/aldryn-faq","forks_url":"https://api.github.com/repos/aldryn/aldryn-faq/forks","keys_url":"https://api.github.com/repos/aldryn/aldryn-faq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aldryn/aldryn-faq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aldryn/aldryn-faq/teams","hooks_url":"https://api.github.com/repos/aldryn/aldryn-faq/hooks","issue_events_url":"https://api.github.com/repos/aldryn/aldryn-faq/issues/events{/number}","events_url":"https://api.github.com/repos/aldryn/aldryn-faq/events","assignees_url":"https://api.github.com/repos/aldryn/aldryn-faq/assignees{/user}","branches_url":"https://api.github.com/repos/aldryn/aldryn-faq/branches{/branch}","tags_url":"https://api.github.com/repos/aldryn/aldryn-faq/tags","blobs_url":"https://api.github.com/repos/aldryn/aldryn-faq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aldryn/aldryn-faq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aldryn/aldryn-faq/git/refs{/sha}","trees_url":"https://api.github.com/repos/aldryn/aldryn-faq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aldryn/aldryn-faq/statuses/{sha}","languages_url":"https://api.github.com/repos/aldryn/aldryn-faq/languages","stargazers_url":"https://api.github.com/repos/aldryn/aldryn-faq/stargazers","contributors_url":"https://api.github.com/repos/aldryn/aldryn-faq/contributors","subscribers_url":"https://api.github.com/repos/aldryn/aldryn-faq/subscribers","subscription_url":"https://api.github.com/repos/aldryn/aldryn-faq/subscription","commits_url":"https://api.github.com/repos/aldryn/aldryn-faq/commits{/sha}","git_commits_url":"https://api.github.com/repos/aldryn/aldryn-faq/git/commits{/sha}","comments_url":"https://api.github.com/repos/aldryn/aldryn-faq/comments{/number}","issue_comment_url":"https://api.github.com/repos/aldryn/aldryn-faq/issues/comments{/number}","contents_url":"https://api.github.com/repos/aldryn/aldryn-faq/contents/{+path}","compare_url":"https://api.github.com/repos/aldryn/aldryn-faq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aldryn/aldryn-faq/merges","archive_url":"https://api.github.com/repos/aldryn/aldryn-faq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aldryn/aldryn-faq/downloads","issues_url":"https://api.github.com/repos/aldryn/aldryn-faq/issues{/number}","pulls_url":"https://api.github.com/repos/aldryn/aldryn-faq/pulls{/number}","milestones_url":"https://api.github.com/repos/aldryn/aldryn-faq/milestones{/number}","notifications_url":"https://api.github.com/repos/aldryn/aldryn-faq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aldryn/aldryn-faq/labels{/name}","releases_url":"https://api.github.com/repos/aldryn/aldryn-faq/releases{/id}","created_at":"2013-08-16T07:37:05Z","updated_at":"2015-06-26T15:24:03Z","pushed_at":"2015-07-17T19:58:58Z","git_url":"git://github.com/aldryn/aldryn-faq.git","ssh_url":"git@github.com:aldryn/aldryn-faq.git","clone_url":"https://github.com/aldryn/aldryn-faq.git","svn_url":"https://github.com/aldryn/aldryn-faq","homepage":"http://www.aldryn.com/en/marketplace/aldryn-faq/","size":1398,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99"},"html":{"href":"https://github.com/aldryn/aldryn-faq/pull/99"},"issue":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/issues/99"},"comments":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/aldryn/aldryn-faq/statuses/ec202cdf3c4eb9c33e307a4d3ec2f6851a1dda80"}}}}