{"action":"created","comment":{"url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/comments/39821855","id":39821855,"diff_hunk":"@@ -11,7 +11,11 @@ def image_thumb(field_name, name='', width=100, description=False, description_t\n     # Self will be the model instance\n     def fn(self):\n         try:\n-            url = getattr(self, field_name).url\n+            image = getattr(self, field_name)\n+            if isinstance(image, types.MethodType):\n+                url = image().url\n+            else:\n+                url = image.url\n         except:\n             return if_no_image\n         return '<img src=\"{url}\" width=\"{width}\" />'.format(url=url, width=width)","path":"admin_methods/model.py","position":12,"original_position":12,"commit_id":"4402f642fb199afb1d842a900dd0c6bcb9e01c66","original_commit_id":"4402f642fb199afb1d842a900dd0c6bcb9e01c66","user":{"login":"matiboy","id":487758,"avatar_url":"https://avatars.githubusercontent.com/u/487758?v=3","gravatar_id":"","url":"https://api.github.com/users/matiboy","html_url":"https://github.com/matiboy","followers_url":"https://api.github.com/users/matiboy/followers","following_url":"https://api.github.com/users/matiboy/following{/other_user}","gists_url":"https://api.github.com/users/matiboy/gists{/gist_id}","starred_url":"https://api.github.com/users/matiboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiboy/subscriptions","organizations_url":"https://api.github.com/users/matiboy/orgs","repos_url":"https://api.github.com/users/matiboy/repos","events_url":"https://api.github.com/users/matiboy/events{/privacy}","received_events_url":"https://api.github.com/users/matiboy/received_events","type":"User","site_admin":false},"body":"Could you have a look at how the list toggle method uses a template and use a template with default instead? Thanks!","created_at":"2015-09-18T03:39:51Z","updated_at":"2015-09-18T03:39:51Z","html_url":"https://github.com/matiboy/django-admin-methods/pull/11#discussion_r39821855","pull_request_url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/comments/39821855"},"html":{"href":"https://github.com/matiboy/django-admin-methods/pull/11#discussion_r39821855"},"pull_request":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11","id":45365386,"html_url":"https://github.com/matiboy/django-admin-methods/pull/11","diff_url":"https://github.com/matiboy/django-admin-methods/pull/11.diff","patch_url":"https://github.com/matiboy/django-admin-methods/pull/11.patch","issue_url":"https://api.github.com/repos/matiboy/django-admin-methods/issues/11","number":11,"state":"open","locked":false,"title":"Add check for methods under admin_methods.model.image_thumb","user":{"login":"mbwk","id":2551599,"avatar_url":"https://avatars.githubusercontent.com/u/2551599?v=3","gravatar_id":"","url":"https://api.github.com/users/mbwk","html_url":"https://github.com/mbwk","followers_url":"https://api.github.com/users/mbwk/followers","following_url":"https://api.github.com/users/mbwk/following{/other_user}","gists_url":"https://api.github.com/users/mbwk/gists{/gist_id}","starred_url":"https://api.github.com/users/mbwk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbwk/subscriptions","organizations_url":"https://api.github.com/users/mbwk/orgs","repos_url":"https://api.github.com/users/mbwk/repos","events_url":"https://api.github.com/users/mbwk/events{/privacy}","received_events_url":"https://api.github.com/users/mbwk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-18T03:18:55Z","updated_at":"2015-09-18T03:39:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8edf64459663a96c30f8e53aac80cef8b0ca5896","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11/commits","review_comments_url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11/comments","review_comment_url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matiboy/django-admin-methods/issues/11/comments","statuses_url":"https://api.github.com/repos/matiboy/django-admin-methods/statuses/4402f642fb199afb1d842a900dd0c6bcb9e01c66","head":{"label":"mbwk:feature/image-method","ref":"feature/image-method","sha":"4402f642fb199afb1d842a900dd0c6bcb9e01c66","user":{"login":"mbwk","id":2551599,"avatar_url":"https://avatars.githubusercontent.com/u/2551599?v=3","gravatar_id":"","url":"https://api.github.com/users/mbwk","html_url":"https://github.com/mbwk","followers_url":"https://api.github.com/users/mbwk/followers","following_url":"https://api.github.com/users/mbwk/following{/other_user}","gists_url":"https://api.github.com/users/mbwk/gists{/gist_id}","starred_url":"https://api.github.com/users/mbwk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbwk/subscriptions","organizations_url":"https://api.github.com/users/mbwk/orgs","repos_url":"https://api.github.com/users/mbwk/repos","events_url":"https://api.github.com/users/mbwk/events{/privacy}","received_events_url":"https://api.github.com/users/mbwk/received_events","type":"User","site_admin":false},"repo":{"id":42695010,"name":"django-admin-methods","full_name":"mbwk/django-admin-methods","owner":{"login":"mbwk","id":2551599,"avatar_url":"https://avatars.githubusercontent.com/u/2551599?v=3","gravatar_id":"","url":"https://api.github.com/users/mbwk","html_url":"https://github.com/mbwk","followers_url":"https://api.github.com/users/mbwk/followers","following_url":"https://api.github.com/users/mbwk/following{/other_user}","gists_url":"https://api.github.com/users/mbwk/gists{/gist_id}","starred_url":"https://api.github.com/users/mbwk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbwk/subscriptions","organizations_url":"https://api.github.com/users/mbwk/orgs","repos_url":"https://api.github.com/users/mbwk/repos","events_url":"https://api.github.com/users/mbwk/events{/privacy}","received_events_url":"https://api.github.com/users/mbwk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbwk/django-admin-methods","description":"Helper functions to create admin related actions, list properties and single instance properties for Django","fork":true,"url":"https://api.github.com/repos/mbwk/django-admin-methods","forks_url":"https://api.github.com/repos/mbwk/django-admin-methods/forks","keys_url":"https://api.github.com/repos/mbwk/django-admin-methods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbwk/django-admin-methods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbwk/django-admin-methods/teams","hooks_url":"https://api.github.com/repos/mbwk/django-admin-methods/hooks","issue_events_url":"https://api.github.com/repos/mbwk/django-admin-methods/issues/events{/number}","events_url":"https://api.github.com/repos/mbwk/django-admin-methods/events","assignees_url":"https://api.github.com/repos/mbwk/django-admin-methods/assignees{/user}","branches_url":"https://api.github.com/repos/mbwk/django-admin-methods/branches{/branch}","tags_url":"https://api.github.com/repos/mbwk/django-admin-methods/tags","blobs_url":"https://api.github.com/repos/mbwk/django-admin-methods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbwk/django-admin-methods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbwk/django-admin-methods/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbwk/django-admin-methods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbwk/django-admin-methods/statuses/{sha}","languages_url":"https://api.github.com/repos/mbwk/django-admin-methods/languages","stargazers_url":"https://api.github.com/repos/mbwk/django-admin-methods/stargazers","contributors_url":"https://api.github.com/repos/mbwk/django-admin-methods/contributors","subscribers_url":"https://api.github.com/repos/mbwk/django-admin-methods/subscribers","subscription_url":"https://api.github.com/repos/mbwk/django-admin-methods/subscription","commits_url":"https://api.github.com/repos/mbwk/django-admin-methods/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbwk/django-admin-methods/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbwk/django-admin-methods/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbwk/django-admin-methods/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbwk/django-admin-methods/contents/{+path}","compare_url":"https://api.github.com/repos/mbwk/django-admin-methods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbwk/django-admin-methods/merges","archive_url":"https://api.github.com/repos/mbwk/django-admin-methods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbwk/django-admin-methods/downloads","issues_url":"https://api.github.com/repos/mbwk/django-admin-methods/issues{/number}","pulls_url":"https://api.github.com/repos/mbwk/django-admin-methods/pulls{/number}","milestones_url":"https://api.github.com/repos/mbwk/django-admin-methods/milestones{/number}","notifications_url":"https://api.github.com/repos/mbwk/django-admin-methods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbwk/django-admin-methods/labels{/name}","releases_url":"https://api.github.com/repos/mbwk/django-admin-methods/releases{/id}","created_at":"2015-09-18T02:36:23Z","updated_at":"2015-09-18T02:36:23Z","pushed_at":"2015-09-18T03:11:52Z","git_url":"git://github.com/mbwk/django-admin-methods.git","ssh_url":"git@github.com:mbwk/django-admin-methods.git","clone_url":"https://github.com/mbwk/django-admin-methods.git","svn_url":"https://github.com/mbwk/django-admin-methods","homepage":null,"size":112,"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":"matiboy:master","ref":"master","sha":"31cfa7a9ed287ac53e18c79c47e90360d0971770","user":{"login":"matiboy","id":487758,"avatar_url":"https://avatars.githubusercontent.com/u/487758?v=3","gravatar_id":"","url":"https://api.github.com/users/matiboy","html_url":"https://github.com/matiboy","followers_url":"https://api.github.com/users/matiboy/followers","following_url":"https://api.github.com/users/matiboy/following{/other_user}","gists_url":"https://api.github.com/users/matiboy/gists{/gist_id}","starred_url":"https://api.github.com/users/matiboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiboy/subscriptions","organizations_url":"https://api.github.com/users/matiboy/orgs","repos_url":"https://api.github.com/users/matiboy/repos","events_url":"https://api.github.com/users/matiboy/events{/privacy}","received_events_url":"https://api.github.com/users/matiboy/received_events","type":"User","site_admin":false},"repo":{"id":30792778,"name":"django-admin-methods","full_name":"matiboy/django-admin-methods","owner":{"login":"matiboy","id":487758,"avatar_url":"https://avatars.githubusercontent.com/u/487758?v=3","gravatar_id":"","url":"https://api.github.com/users/matiboy","html_url":"https://github.com/matiboy","followers_url":"https://api.github.com/users/matiboy/followers","following_url":"https://api.github.com/users/matiboy/following{/other_user}","gists_url":"https://api.github.com/users/matiboy/gists{/gist_id}","starred_url":"https://api.github.com/users/matiboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiboy/subscriptions","organizations_url":"https://api.github.com/users/matiboy/orgs","repos_url":"https://api.github.com/users/matiboy/repos","events_url":"https://api.github.com/users/matiboy/events{/privacy}","received_events_url":"https://api.github.com/users/matiboy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matiboy/django-admin-methods","description":"Helper functions to create admin related actions, list properties and single instance properties for Django","fork":false,"url":"https://api.github.com/repos/matiboy/django-admin-methods","forks_url":"https://api.github.com/repos/matiboy/django-admin-methods/forks","keys_url":"https://api.github.com/repos/matiboy/django-admin-methods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matiboy/django-admin-methods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matiboy/django-admin-methods/teams","hooks_url":"https://api.github.com/repos/matiboy/django-admin-methods/hooks","issue_events_url":"https://api.github.com/repos/matiboy/django-admin-methods/issues/events{/number}","events_url":"https://api.github.com/repos/matiboy/django-admin-methods/events","assignees_url":"https://api.github.com/repos/matiboy/django-admin-methods/assignees{/user}","branches_url":"https://api.github.com/repos/matiboy/django-admin-methods/branches{/branch}","tags_url":"https://api.github.com/repos/matiboy/django-admin-methods/tags","blobs_url":"https://api.github.com/repos/matiboy/django-admin-methods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matiboy/django-admin-methods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matiboy/django-admin-methods/git/refs{/sha}","trees_url":"https://api.github.com/repos/matiboy/django-admin-methods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matiboy/django-admin-methods/statuses/{sha}","languages_url":"https://api.github.com/repos/matiboy/django-admin-methods/languages","stargazers_url":"https://api.github.com/repos/matiboy/django-admin-methods/stargazers","contributors_url":"https://api.github.com/repos/matiboy/django-admin-methods/contributors","subscribers_url":"https://api.github.com/repos/matiboy/django-admin-methods/subscribers","subscription_url":"https://api.github.com/repos/matiboy/django-admin-methods/subscription","commits_url":"https://api.github.com/repos/matiboy/django-admin-methods/commits{/sha}","git_commits_url":"https://api.github.com/repos/matiboy/django-admin-methods/git/commits{/sha}","comments_url":"https://api.github.com/repos/matiboy/django-admin-methods/comments{/number}","issue_comment_url":"https://api.github.com/repos/matiboy/django-admin-methods/issues/comments{/number}","contents_url":"https://api.github.com/repos/matiboy/django-admin-methods/contents/{+path}","compare_url":"https://api.github.com/repos/matiboy/django-admin-methods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matiboy/django-admin-methods/merges","archive_url":"https://api.github.com/repos/matiboy/django-admin-methods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matiboy/django-admin-methods/downloads","issues_url":"https://api.github.com/repos/matiboy/django-admin-methods/issues{/number}","pulls_url":"https://api.github.com/repos/matiboy/django-admin-methods/pulls{/number}","milestones_url":"https://api.github.com/repos/matiboy/django-admin-methods/milestones{/number}","notifications_url":"https://api.github.com/repos/matiboy/django-admin-methods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matiboy/django-admin-methods/labels{/name}","releases_url":"https://api.github.com/repos/matiboy/django-admin-methods/releases{/id}","created_at":"2015-02-14T09:47:33Z","updated_at":"2015-02-26T00:44:02Z","pushed_at":"2015-09-18T03:18:55Z","git_url":"git://github.com/matiboy/django-admin-methods.git","ssh_url":"git@github.com:matiboy/django-admin-methods.git","clone_url":"https://github.com/matiboy/django-admin-methods.git","svn_url":"https://github.com/matiboy/django-admin-methods","homepage":null,"size":315,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11"},"html":{"href":"https://github.com/matiboy/django-admin-methods/pull/11"},"issue":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/issues/11"},"comments":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/matiboy/django-admin-methods/statuses/4402f642fb199afb1d842a900dd0c6bcb9e01c66"}}}}