{"action":"opened","number":429,"pull_request":{"url":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/429","id":31722969,"html_url":"https://github.com/mitsuhiko/jinja2/pull/429","diff_url":"https://github.com/mitsuhiko/jinja2/pull/429.diff","patch_url":"https://github.com/mitsuhiko/jinja2/pull/429.patch","issue_url":"https://api.github.com/repos/mitsuhiko/jinja2/issues/429","number":429,"state":"open","locked":false,"title":"firstof function","user":{"login":"axil","id":170910,"avatar_url":"https://avatars.githubusercontent.com/u/170910?v=3","gravatar_id":"","url":"https://api.github.com/users/axil","html_url":"https://github.com/axil","followers_url":"https://api.github.com/users/axil/followers","following_url":"https://api.github.com/users/axil/following{/other_user}","gists_url":"https://api.github.com/users/axil/gists{/gist_id}","starred_url":"https://api.github.com/users/axil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axil/subscriptions","organizations_url":"https://api.github.com/users/axil/orgs","repos_url":"https://api.github.com/users/axil/repos","events_url":"https://api.github.com/users/axil/events{/privacy}","received_events_url":"https://api.github.com/users/axil/received_events","type":"User","site_admin":false},"body":"To simplify transition of django templates to jinja2:\r\n\r\n{% firstof obj1 obj2 obj3 %} -> {{ firstof(obj1, obj2, obj3) }}\r\n\r\ninstead of currently working\r\n\r\n{% [obj1, obj2, obj3]|select|first %}\r\n\r\nOr at least maybe mention this in the documentation somewhere for it doesn't look obvious at first glance.\r\n\r\nPS Yes, I've seen https://github.com/mitsuhiko/jinja2/pull/42","created_at":"2015-03-23T11:16:34Z","updated_at":"2015-03-23T11:16:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/429/commits","review_comments_url":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/429/comments","review_comment_url":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitsuhiko/jinja2/issues/429/comments","statuses_url":"https://api.github.com/repos/mitsuhiko/jinja2/statuses/fc9f2ce11bd82d10b907e12863cd20fe5de14e97","head":{"label":"axil:master","ref":"master","sha":"fc9f2ce11bd82d10b907e12863cd20fe5de14e97","user":{"login":"axil","id":170910,"avatar_url":"https://avatars.githubusercontent.com/u/170910?v=3","gravatar_id":"","url":"https://api.github.com/users/axil","html_url":"https://github.com/axil","followers_url":"https://api.github.com/users/axil/followers","following_url":"https://api.github.com/users/axil/following{/other_user}","gists_url":"https://api.github.com/users/axil/gists{/gist_id}","starred_url":"https://api.github.com/users/axil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axil/subscriptions","organizations_url":"https://api.github.com/users/axil/orgs","repos_url":"https://api.github.com/users/axil/repos","events_url":"https://api.github.com/users/axil/events{/privacy}","received_events_url":"https://api.github.com/users/axil/received_events","type":"User","site_admin":false},"repo":{"id":32724929,"name":"jinja2","full_name":"axil/jinja2","owner":{"login":"axil","id":170910,"avatar_url":"https://avatars.githubusercontent.com/u/170910?v=3","gravatar_id":"","url":"https://api.github.com/users/axil","html_url":"https://github.com/axil","followers_url":"https://api.github.com/users/axil/followers","following_url":"https://api.github.com/users/axil/following{/other_user}","gists_url":"https://api.github.com/users/axil/gists{/gist_id}","starred_url":"https://api.github.com/users/axil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axil/subscriptions","organizations_url":"https://api.github.com/users/axil/orgs","repos_url":"https://api.github.com/users/axil/repos","events_url":"https://api.github.com/users/axil/events{/privacy}","received_events_url":"https://api.github.com/users/axil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/axil/jinja2","description":"The Jinja2 template engine","fork":true,"url":"https://api.github.com/repos/axil/jinja2","forks_url":"https://api.github.com/repos/axil/jinja2/forks","keys_url":"https://api.github.com/repos/axil/jinja2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axil/jinja2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axil/jinja2/teams","hooks_url":"https://api.github.com/repos/axil/jinja2/hooks","issue_events_url":"https://api.github.com/repos/axil/jinja2/issues/events{/number}","events_url":"https://api.github.com/repos/axil/jinja2/events","assignees_url":"https://api.github.com/repos/axil/jinja2/assignees{/user}","branches_url":"https://api.github.com/repos/axil/jinja2/branches{/branch}","tags_url":"https://api.github.com/repos/axil/jinja2/tags","blobs_url":"https://api.github.com/repos/axil/jinja2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axil/jinja2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axil/jinja2/git/refs{/sha}","trees_url":"https://api.github.com/repos/axil/jinja2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axil/jinja2/statuses/{sha}","languages_url":"https://api.github.com/repos/axil/jinja2/languages","stargazers_url":"https://api.github.com/repos/axil/jinja2/stargazers","contributors_url":"https://api.github.com/repos/axil/jinja2/contributors","subscribers_url":"https://api.github.com/repos/axil/jinja2/subscribers","subscription_url":"https://api.github.com/repos/axil/jinja2/subscription","commits_url":"https://api.github.com/repos/axil/jinja2/commits{/sha}","git_commits_url":"https://api.github.com/repos/axil/jinja2/git/commits{/sha}","comments_url":"https://api.github.com/repos/axil/jinja2/comments{/number}","issue_comment_url":"https://api.github.com/repos/axil/jinja2/issues/comments{/number}","contents_url":"https://api.github.com/repos/axil/jinja2/contents/{+path}","compare_url":"https://api.github.com/repos/axil/jinja2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axil/jinja2/merges","archive_url":"https://api.github.com/repos/axil/jinja2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axil/jinja2/downloads","issues_url":"https://api.github.com/repos/axil/jinja2/issues{/number}","pulls_url":"https://api.github.com/repos/axil/jinja2/pulls{/number}","milestones_url":"https://api.github.com/repos/axil/jinja2/milestones{/number}","notifications_url":"https://api.github.com/repos/axil/jinja2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axil/jinja2/labels{/name}","releases_url":"https://api.github.com/repos/axil/jinja2/releases{/id}","created_at":"2015-03-23T10:20:01Z","updated_at":"2015-03-23T11:04:09Z","pushed_at":"2015-03-23T11:04:09Z","git_url":"git://github.com/axil/jinja2.git","ssh_url":"git@github.com:axil/jinja2.git","clone_url":"https://github.com/axil/jinja2.git","svn_url":"https://github.com/axil/jinja2","homepage":"http://jinja.pocoo.org/","size":7488,"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":"mitsuhiko:master","ref":"master","sha":"eb8f0e03051bd1e4acbb8ec13cc66751e3cd5a0a","user":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"repo":{"id":994551,"name":"jinja2","full_name":"mitsuhiko/jinja2","owner":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitsuhiko/jinja2","description":"The Jinja2 template engine","fork":false,"url":"https://api.github.com/repos/mitsuhiko/jinja2","forks_url":"https://api.github.com/repos/mitsuhiko/jinja2/forks","keys_url":"https://api.github.com/repos/mitsuhiko/jinja2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitsuhiko/jinja2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitsuhiko/jinja2/teams","hooks_url":"https://api.github.com/repos/mitsuhiko/jinja2/hooks","issue_events_url":"https://api.github.com/repos/mitsuhiko/jinja2/issues/events{/number}","events_url":"https://api.github.com/repos/mitsuhiko/jinja2/events","assignees_url":"https://api.github.com/repos/mitsuhiko/jinja2/assignees{/user}","branches_url":"https://api.github.com/repos/mitsuhiko/jinja2/branches{/branch}","tags_url":"https://api.github.com/repos/mitsuhiko/jinja2/tags","blobs_url":"https://api.github.com/repos/mitsuhiko/jinja2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitsuhiko/jinja2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitsuhiko/jinja2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitsuhiko/jinja2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitsuhiko/jinja2/statuses/{sha}","languages_url":"https://api.github.com/repos/mitsuhiko/jinja2/languages","stargazers_url":"https://api.github.com/repos/mitsuhiko/jinja2/stargazers","contributors_url":"https://api.github.com/repos/mitsuhiko/jinja2/contributors","subscribers_url":"https://api.github.com/repos/mitsuhiko/jinja2/subscribers","subscription_url":"https://api.github.com/repos/mitsuhiko/jinja2/subscription","commits_url":"https://api.github.com/repos/mitsuhiko/jinja2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitsuhiko/jinja2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitsuhiko/jinja2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitsuhiko/jinja2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitsuhiko/jinja2/contents/{+path}","compare_url":"https://api.github.com/repos/mitsuhiko/jinja2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitsuhiko/jinja2/merges","archive_url":"https://api.github.com/repos/mitsuhiko/jinja2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitsuhiko/jinja2/downloads","issues_url":"https://api.github.com/repos/mitsuhiko/jinja2/issues{/number}","pulls_url":"https://api.github.com/repos/mitsuhiko/jinja2/pulls{/number}","milestones_url":"https://api.github.com/repos/mitsuhiko/jinja2/milestones{/number}","notifications_url":"https://api.github.com/repos/mitsuhiko/jinja2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitsuhiko/jinja2/labels{/name}","releases_url":"https://api.github.com/repos/mitsuhiko/jinja2/releases{/id}","created_at":"2010-10-17T13:41:17Z","updated_at":"2015-03-22T13:36:44Z","pushed_at":"2015-03-22T13:36:44Z","git_url":"git://github.com/mitsuhiko/jinja2.git","ssh_url":"git@github.com:mitsuhiko/jinja2.git","clone_url":"https://github.com/mitsuhiko/jinja2.git","svn_url":"https://github.com/mitsuhiko/jinja2","homepage":"http://jinja.pocoo.org/","size":7488,"stargazers_count":2289,"watchers_count":2289,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":469,"mirror_url":null,"open_issues_count":116,"forks":469,"open_issues":116,"watchers":2289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/429"},"html":{"href":"https://github.com/mitsuhiko/jinja2/pull/429"},"issue":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/issues/429"},"comments":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/mitsuhiko/jinja2/statuses/fc9f2ce11bd82d10b907e12863cd20fe5de14e97"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":7,"deletions":3,"changed_files":2}}