{"action":"created","comment":{"url":"https://api.github.com/repos/ic-labs/django-icekit/pulls/comments/81699986","pull_request_review_id":2660311,"id":81699986,"diff_hunk":"@@ -414,18 +414,18 @@\n # given model/field, without generating additional unecessary thumbnails. This\n # is essential when using a remote storage backend.\n THUMBNAIL_ALIASES = {\n-#     'app[.model][.field]': {\n-#         'name-WxH': {\n-#             'size': (W, H),\n-#             ...,\n-#         },\n-#     },\n+    # 'app[.model][.field]': {\n+    #   'name-WxH': { 'size': (W, H), },\n+    # },\n     '': {\n+        'author_portrait': {\n+            'size': (360, 640),\n+        },","path":"icekit/project/settings/_base.py","position":16,"original_position":16,"commit_id":"0eaad19ffcec9b74fc04dbbc5fb34b801284087c","original_commit_id":"0eaad19ffcec9b74fc04dbbc5fb34b801284087c","user":{"login":"mrmachine","id":51939,"avatar_url":"https://avatars.githubusercontent.com/u/51939?v=3","gravatar_id":"","url":"https://api.github.com/users/mrmachine","html_url":"https://github.com/mrmachine","followers_url":"https://api.github.com/users/mrmachine/followers","following_url":"https://api.github.com/users/mrmachine/following{/other_user}","gists_url":"https://api.github.com/users/mrmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmachine/subscriptions","organizations_url":"https://api.github.com/users/mrmachine/orgs","repos_url":"https://api.github.com/users/mrmachine/repos","events_url":"https://api.github.com/users/mrmachine/events{/privacy}","received_events_url":"https://api.github.com/users/mrmachine/received_events","type":"User","site_admin":false},"body":"Fair enough, if we want to use the alias in templates that exist outside the authors app, then we need a global alias. And you're probably right that authors_portrait probably won't clash (or the wrong size). But it still feels like chance rather than good practice.\r\n\r\nPreviously (SFMOMA) I believe we didn't use aliases at all, which is probably what made it hard to find and replace all occurrences when designs changed. We only started using aliases when we started resolving scaling issues (offline compression, generating thumbnails at upload time, etc.)\r\n\r\nSo just by using any alias at all (even one that includes WxD), I think we are already much better off in terms of updating templates if/when the dimensions change.\r\n\r\nI don't think it's a bad idea to include the WxD in the alias name specifically because:\r\n\r\n1. we used to embed WxD in the template anyway, before we used aliases;\r\n2. it avoids the issue where any other template (from another app or our own apps) needs to know beforehand the dimensions of the alias and that it is correct for the template;\r\n3. it's probably easier to find and replace `authors_portrait_WxD` than just `authors_portrait`;\r\n4. it's one clear convention to follow -- we don't find ourselves in a situation where actually someone does want to display a differently sized version of a portrait and then has to decide on a name like `authors_portrait_small` (and then if there's another template that needs `authors_portrait_xsmall`, and then maybe one of the templates changes and small is now smaller than xsmall).\r\n\r\nI think it's clearer to include WxD to disambiguate the size requirement than words that describe the template/name/purpose/size. The name component of the alias should still be as descriptive as possible to avoid conflicts, but it should define the image source (not where it is used). We shouldn't care where/how/why it is used. Just what it is and what size it is.\r\n\r\nAlso, note that with offline generation of thumbnails, global thumbnails will be generated for *all global aliases* for all images that are uploaded. So we will have image fields on models completely unrelated to author portraits, having an \"authors_portrait\" thumbnail generated. The app/model namespace helps us only generate those thumbnails we need for the authors portrait image when it is uploaded.","created_at":"2016-10-04T07:37:02Z","updated_at":"2016-10-04T07:37:02Z","html_url":"https://github.com/ic-labs/django-icekit/pull/29#discussion_r81699986","pull_request_url":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/ic-labs/django-icekit/pulls/comments/81699986"},"html":{"href":"https://github.com/ic-labs/django-icekit/pull/29#discussion_r81699986"},"pull_request":{"href":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29","id":86893913,"html_url":"https://github.com/ic-labs/django-icekit/pull/29","diff_url":"https://github.com/ic-labs/django-icekit/pull/29.diff","patch_url":"https://github.com/ic-labs/django-icekit/pull/29.patch","issue_url":"https://api.github.com/repos/ic-labs/django-icekit/issues/29","number":29,"state":"open","locked":false,"title":"Feature/new articles","user":{"login":"cogat","id":55459,"avatar_url":"https://avatars.githubusercontent.com/u/55459?v=3","gravatar_id":"","url":"https://api.github.com/users/cogat","html_url":"https://github.com/cogat","followers_url":"https://api.github.com/users/cogat/followers","following_url":"https://api.github.com/users/cogat/following{/other_user}","gists_url":"https://api.github.com/users/cogat/gists{/gist_id}","starred_url":"https://api.github.com/users/cogat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogat/subscriptions","organizations_url":"https://api.github.com/users/cogat/orgs","repos_url":"https://api.github.com/users/cogat/repos","events_url":"https://api.github.com/users/cogat/events{/privacy}","received_events_url":"https://api.github.com/users/cogat/received_events","type":"User","site_admin":false},"body":"Extends ICEkit with an authors app, for describing content authors. The Authors app uses the updated Article+ListingPage pattern, which is also used in latest press-releases and elsewhere.","created_at":"2016-09-27T09:37:13Z","updated_at":"2016-10-04T07:37:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99f42146448555e3253f0ffb1330452c8dd43fed","assignee":{"login":"cogat","id":55459,"avatar_url":"https://avatars.githubusercontent.com/u/55459?v=3","gravatar_id":"","url":"https://api.github.com/users/cogat","html_url":"https://github.com/cogat","followers_url":"https://api.github.com/users/cogat/followers","following_url":"https://api.github.com/users/cogat/following{/other_user}","gists_url":"https://api.github.com/users/cogat/gists{/gist_id}","starred_url":"https://api.github.com/users/cogat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogat/subscriptions","organizations_url":"https://api.github.com/users/cogat/orgs","repos_url":"https://api.github.com/users/cogat/repos","events_url":"https://api.github.com/users/cogat/events{/privacy}","received_events_url":"https://api.github.com/users/cogat/received_events","type":"User","site_admin":false},"assignees":[{"login":"cogat","id":55459,"avatar_url":"https://avatars.githubusercontent.com/u/55459?v=3","gravatar_id":"","url":"https://api.github.com/users/cogat","html_url":"https://github.com/cogat","followers_url":"https://api.github.com/users/cogat/followers","following_url":"https://api.github.com/users/cogat/following{/other_user}","gists_url":"https://api.github.com/users/cogat/gists{/gist_id}","starred_url":"https://api.github.com/users/cogat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogat/subscriptions","organizations_url":"https://api.github.com/users/cogat/orgs","repos_url":"https://api.github.com/users/cogat/repos","events_url":"https://api.github.com/users/cogat/events{/privacy}","received_events_url":"https://api.github.com/users/cogat/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29/commits","review_comments_url":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29/comments","review_comment_url":"https://api.github.com/repos/ic-labs/django-icekit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ic-labs/django-icekit/issues/29/comments","statuses_url":"https://api.github.com/repos/ic-labs/django-icekit/statuses/0eaad19ffcec9b74fc04dbbc5fb34b801284087c","head":{"label":"ic-labs:feature/new_articles","ref":"feature/new_articles","sha":"0eaad19ffcec9b74fc04dbbc5fb34b801284087c","user":{"login":"ic-labs","id":19848351,"avatar_url":"https://avatars.githubusercontent.com/u/19848351?v=3","gravatar_id":"","url":"https://api.github.com/users/ic-labs","html_url":"https://github.com/ic-labs","followers_url":"https://api.github.com/users/ic-labs/followers","following_url":"https://api.github.com/users/ic-labs/following{/other_user}","gists_url":"https://api.github.com/users/ic-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ic-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ic-labs/subscriptions","organizations_url":"https://api.github.com/users/ic-labs/orgs","repos_url":"https://api.github.com/users/ic-labs/repos","events_url":"https://api.github.com/users/ic-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ic-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":65470395,"name":"django-icekit","full_name":"ic-labs/django-icekit","owner":{"login":"ic-labs","id":19848351,"avatar_url":"https://avatars.githubusercontent.com/u/19848351?v=3","gravatar_id":"","url":"https://api.github.com/users/ic-labs","html_url":"https://github.com/ic-labs","followers_url":"https://api.github.com/users/ic-labs/followers","following_url":"https://api.github.com/users/ic-labs/following{/other_user}","gists_url":"https://api.github.com/users/ic-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ic-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ic-labs/subscriptions","organizations_url":"https://api.github.com/users/ic-labs/orgs","repos_url":"https://api.github.com/users/ic-labs/repos","events_url":"https://api.github.com/users/ic-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ic-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ic-labs/django-icekit","description":"A modular content CMS by Interaction Consortium.","fork":false,"url":"https://api.github.com/repos/ic-labs/django-icekit","forks_url":"https://api.github.com/repos/ic-labs/django-icekit/forks","keys_url":"https://api.github.com/repos/ic-labs/django-icekit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ic-labs/django-icekit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ic-labs/django-icekit/teams","hooks_url":"https://api.github.com/repos/ic-labs/django-icekit/hooks","issue_events_url":"https://api.github.com/repos/ic-labs/django-icekit/issues/events{/number}","events_url":"https://api.github.com/repos/ic-labs/django-icekit/events","assignees_url":"https://api.github.com/repos/ic-labs/django-icekit/assignees{/user}","branches_url":"https://api.github.com/repos/ic-labs/django-icekit/branches{/branch}","tags_url":"https://api.github.com/repos/ic-labs/django-icekit/tags","blobs_url":"https://api.github.com/repos/ic-labs/django-icekit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ic-labs/django-icekit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ic-labs/django-icekit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ic-labs/django-icekit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ic-labs/django-icekit/statuses/{sha}","languages_url":"https://api.github.com/repos/ic-labs/django-icekit/languages","stargazers_url":"https://api.github.com/repos/ic-labs/django-icekit/stargazers","contributors_url":"https://api.github.com/repos/ic-labs/django-icekit/contributors","subscribers_url":"https://api.github.com/repos/ic-labs/django-icekit/subscribers","subscription_url":"https://api.github.com/repos/ic-labs/django-icekit/subscription","commits_url":"https://api.github.com/repos/ic-labs/django-icekit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ic-labs/django-icekit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ic-labs/django-icekit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ic-labs/django-icekit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ic-labs/django-icekit/contents/{+path}","compare_url":"https://api.github.com/repos/ic-labs/django-icekit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ic-labs/django-icekit/merges","archive_url":"https://api.github.com/repos/ic-labs/django-icekit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ic-labs/django-icekit/downloads","issues_url":"https://api.github.com/repos/ic-labs/django-icekit/issues{/number}","pulls_url":"https://api.github.com/repos/ic-labs/django-icekit/pulls{/number}","milestones_url":"https://api.github.com/repos/ic-labs/django-icekit/milestones{/number}","notifications_url":"https://api.github.com/repos/ic-labs/django-icekit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ic-labs/django-icekit/labels{/name}","releases_url":"https://api.github.com/repos/ic-labs/django-icekit/releases{/id}","deployments_url":"https://api.github.com/repos/ic-labs/django-icekit/deployments","created_at":"2016-08-11T13:11:02Z","updated_at":"2016-09-13T03:50:58Z","pushed_at":"2016-10-04T05:58:09Z","git_url":"git://github.com/ic-labs/django-icekit.git","ssh_url":"git@github.com:ic-labs/django-icekit.git","clone_url":"https://github.com/ic-labs/django-icekit.git","svn_url":"https://github.com/ic-labs/django-icekit","homepage":"http://icekit.net","size":2816,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":1,"default_branch":"develop"}},"base":{"label":"ic-labs:develop","ref":"develop","sha":"d6643dec0aec7d9cd2c656940e2049942e40982f","user":{"login":"ic-labs","id":19848351,"avatar_url":"https://avatars.githubusercontent.com/u/19848351?v=3","gravatar_id":"","url":"https://api.github.com/users/ic-labs","html_url":"https://github.com/ic-labs","followers_url":"https://api.github.com/users/ic-labs/followers","following_url":"https://api.github.com/users/ic-labs/following{/other_user}","gists_url":"https://api.github.com/users/ic-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ic-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ic-labs/subscriptions","organizations_url":"https://api.github.com/users/ic-labs/orgs","repos_url":"https://api.github.com/users/ic-labs/repos","events_url":"https://api.github.com/users/ic-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ic-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":65470395,"name":"django-icekit","full_name":"ic-labs/django-icekit","owner":{"login":"ic-labs","id":19848351,"avatar_url":"https://avatars.githubusercontent.com/u/19848351?v=3","gravatar_id":"","url":"https://api.github.com/users/ic-labs","html_url":"https://github.com/ic-labs","followers_url":"https://api.github.com/users/ic-labs/followers","following_url":"https://api.github.com/users/ic-labs/following{/other_user}","gists_url":"https://api.github.com/users/ic-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ic-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ic-labs/subscriptions","organizations_url":"https://api.github.com/users/ic-labs/orgs","repos_url":"https://api.github.com/users/ic-labs/repos","events_url":"https://api.github.com/users/ic-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ic-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ic-labs/django-icekit","description":"A modular content CMS by Interaction Consortium.","fork":false,"url":"https://api.github.com/repos/ic-labs/django-icekit","forks_url":"https://api.github.com/repos/ic-labs/django-icekit/forks","keys_url":"https://api.github.com/repos/ic-labs/django-icekit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ic-labs/django-icekit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ic-labs/django-icekit/teams","hooks_url":"https://api.github.com/repos/ic-labs/django-icekit/hooks","issue_events_url":"https://api.github.com/repos/ic-labs/django-icekit/issues/events{/number}","events_url":"https://api.github.com/repos/ic-labs/django-icekit/events","assignees_url":"https://api.github.com/repos/ic-labs/django-icekit/assignees{/user}","branches_url":"https://api.github.com/repos/ic-labs/django-icekit/branches{/branch}","tags_url":"https://api.github.com/repos/ic-labs/django-icekit/tags","blobs_url":"https://api.github.com/repos/ic-labs/django-icekit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ic-labs/django-icekit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ic-labs/django-icekit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ic-labs/django-icekit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ic-labs/django-icekit/statuses/{sha}","languages_url":"https://api.github.com/repos/ic-labs/django-icekit/languages","stargazers_url":"https://api.github.com/repos/ic-labs/django-icekit/stargazers","contributors_url":"https://api.github.com/repos/ic-labs/django-icekit/contributors","subscribers_url":"https://api.github.com/repos/ic-labs/django-icekit/subscribers","subscription_url":"https://api.github.com/repos/ic-labs/django-icekit/subscription","commits_url":"https://api.github.com/repos/ic-labs/django-icekit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ic-labs/django-icekit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ic-labs/django-icekit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ic-labs/django-icekit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ic-labs/django-icekit/contents/{+path}","compare_url":"https://api.github.com/repos/ic-labs/django-icekit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ic-labs/django-icekit/merges","archive_url":"https://api.github.com/repos/ic-labs/django-icekit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ic-labs/django-icekit/downloads","issues_url":"https://api.github.com/repos/ic-labs/django-icekit/issues{/number}","pulls_url":"https://api.github.com/repos/ic-labs/django-icekit/pulls{/number}","milestones_url":"https://api.github.com/repos/ic-labs/django-icekit/milestones{/number}","notifications_url":"https://api.github.com/repos/ic-labs/django-icekit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ic-labs/django-icekit/labels{/name}","releases_url":"https://api.github.com/repos/ic-labs/django-icekit/releases{/id}","deployments_url":"https://api.github.com/repos/ic-labs/django-icekit/deployments","created_at":"2016-08-11T13:11:02Z","updated_at":"2016-09-13T03:50:58Z","pushed_at":"2016-10-04T05:58:09Z","git_url":"git://github.com/ic-labs/django-icekit.git","ssh_url":"git@github.com:ic-labs/django-icekit.git","clone_url":"https://github.com/ic-labs/django-icekit.git","svn_url":"https://github.com/ic-labs/django-icekit","homepage":"http://icekit.net","size":2816,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29"},"html":{"href":"https://github.com/ic-labs/django-icekit/pull/29"},"issue":{"href":"https://api.github.com/repos/ic-labs/django-icekit/issues/29"},"comments":{"href":"https://api.github.com/repos/ic-labs/django-icekit/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/ic-labs/django-icekit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ic-labs/django-icekit/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/ic-labs/django-icekit/statuses/0eaad19ffcec9b74fc04dbbc5fb34b801284087c"}}}}
{"actor":{"display_login":"mrmachine"}}