{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/168461246","pull_request_review_id":96798621,"id":168461246,"diff_hunk":"@@ -441,24 +444,43 @@ adds defaults that differ from Jinja2's for a few options:\n     Unless all of these conditions are met, passing a function to the template is\n     simpler and more in line with the design of Jinja2.\n \n-The default configuration is purposefully kept to a minimum. If a template is\n-rendered with a request (e.g. when using :py:func:`~django.shortcuts.render`),\n-the ``Jinja2`` backend adds the globals ``request``, ``csrf_input``, and\n-``csrf_token`` to the context. Apart from that, this backend doesn't create a\n-Django-flavored environment. It doesn't know about Django filters and tags.\n-In order to use Django-specific APIs, you must configure them into the\n-environment.\n+If a template is rendered with a request (e.g. when using\n+:py:func:`~django.shortcuts.render`), the ``Jinja2`` backend adds the globals\n+``request``, ``csrf_input``, and ``csrf_token`` to the context. Apart from\n+that, this backend does not create a Django-flavored environment. It doesn't\n+know about Django filters and tags. In order to use Django-specific APIs, you\n+must configure them into the environment.\n+\n+The default ``'django.template.backends.jinja2.default_environment'``\n+environment adds some minimal helpers: it gives access to a ``url`` function,","path":"docs/topics/templates.txt","position":41,"original_position":41,"commit_id":"0e6c0789cfd7d691f114095c89a357a8709e03bb","original_commit_id":"0e6c0789cfd7d691f114095c89a357a8709e03bb","user":{"login":"carltongibson","id":64686,"avatar_url":"https://avatars1.githubusercontent.com/u/64686?v=4","gravatar_id":"","url":"https://api.github.com/users/carltongibson","html_url":"https://github.com/carltongibson","followers_url":"https://api.github.com/users/carltongibson/followers","following_url":"https://api.github.com/users/carltongibson/following{/other_user}","gists_url":"https://api.github.com/users/carltongibson/gists{/gist_id}","starred_url":"https://api.github.com/users/carltongibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carltongibson/subscriptions","organizations_url":"https://api.github.com/users/carltongibson/orgs","repos_url":"https://api.github.com/users/carltongibson/repos","events_url":"https://api.github.com/users/carltongibson/events{/privacy}","received_events_url":"https://api.github.com/users/carltongibson/received_events","type":"User","site_admin":false},"body":"Not quite sure about \"...helpers...\" here. ","created_at":"2018-02-15T12:29:49Z","updated_at":"2018-02-15T12:31:10Z","html_url":"https://github.com/django/django/pull/9666#discussion_r168461246","pull_request_url":"https://api.github.com/repos/django/django/pulls/9666","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/168461246"},"html":{"href":"https://github.com/django/django/pull/9666#discussion_r168461246"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/9666"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/9666","id":167247046,"html_url":"https://github.com/django/django/pull/9666","diff_url":"https://github.com/django/django/pull/9666.diff","patch_url":"https://github.com/django/django/pull/9666.patch","issue_url":"https://api.github.com/repos/django/django/issues/9666","number":9666,"state":"open","locked":false,"title":"Fixed #29115 -- Allow rendering of admin forms with Jinja2","user":{"login":"tarkatronic","id":37809,"avatar_url":"https://avatars0.githubusercontent.com/u/37809?v=4","gravatar_id":"","url":"https://api.github.com/users/tarkatronic","html_url":"https://github.com/tarkatronic","followers_url":"https://api.github.com/users/tarkatronic/followers","following_url":"https://api.github.com/users/tarkatronic/following{/other_user}","gists_url":"https://api.github.com/users/tarkatronic/gists{/gist_id}","starred_url":"https://api.github.com/users/tarkatronic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarkatronic/subscriptions","organizations_url":"https://api.github.com/users/tarkatronic/orgs","repos_url":"https://api.github.com/users/tarkatronic/repos","events_url":"https://api.github.com/users/tarkatronic/events{/privacy}","received_events_url":"https://api.github.com/users/tarkatronic/received_events","type":"User","site_admin":false},"body":"This is for the ticket: https://code.djangoproject.com/ticket/29115\r\n\r\nThis enables users to set `FORM_RENDERER = 'django.forms.renderers.Jinja2'`, and have a working admin out of the box.\r\n\r\nAs a side effect, users will get a more usable Jinja2 environment by default, due to a new default environment for the Jinja2 backend which provides the `static` and `url` functions (taken directly from the documentation) along with i18n functionality.\r\n\r\nThe one part I had trouble figuring out was exactly what tests to add. The new `django.template.backends.jinja2.default_environment` gets automatically tested by means of the pre-existing Jinja2 tests, but the admin Jinja2 templates do not get directly tested. Any help in figuring this out would be greatly appreciated!","created_at":"2018-02-05T20:30:45Z","updated_at":"2018-02-15T12:31:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"778791355e15250645454a5bff4f8cfff20488b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/9666/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/9666/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/9666/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/0e6c0789cfd7d691f114095c89a357a8709e03bb","head":{"label":"tarkatronic:ticket_29115","ref":"ticket_29115","sha":"0e6c0789cfd7d691f114095c89a357a8709e03bb","user":{"login":"tarkatronic","id":37809,"avatar_url":"https://avatars0.githubusercontent.com/u/37809?v=4","gravatar_id":"","url":"https://api.github.com/users/tarkatronic","html_url":"https://github.com/tarkatronic","followers_url":"https://api.github.com/users/tarkatronic/followers","following_url":"https://api.github.com/users/tarkatronic/following{/other_user}","gists_url":"https://api.github.com/users/tarkatronic/gists{/gist_id}","starred_url":"https://api.github.com/users/tarkatronic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarkatronic/subscriptions","organizations_url":"https://api.github.com/users/tarkatronic/orgs","repos_url":"https://api.github.com/users/tarkatronic/repos","events_url":"https://api.github.com/users/tarkatronic/events{/privacy}","received_events_url":"https://api.github.com/users/tarkatronic/received_events","type":"User","site_admin":false},"repo":{"id":108464753,"name":"django","full_name":"tarkatronic/django","owner":{"login":"tarkatronic","id":37809,"avatar_url":"https://avatars0.githubusercontent.com/u/37809?v=4","gravatar_id":"","url":"https://api.github.com/users/tarkatronic","html_url":"https://github.com/tarkatronic","followers_url":"https://api.github.com/users/tarkatronic/followers","following_url":"https://api.github.com/users/tarkatronic/following{/other_user}","gists_url":"https://api.github.com/users/tarkatronic/gists{/gist_id}","starred_url":"https://api.github.com/users/tarkatronic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarkatronic/subscriptions","organizations_url":"https://api.github.com/users/tarkatronic/orgs","repos_url":"https://api.github.com/users/tarkatronic/repos","events_url":"https://api.github.com/users/tarkatronic/events{/privacy}","received_events_url":"https://api.github.com/users/tarkatronic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tarkatronic/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/tarkatronic/django","forks_url":"https://api.github.com/repos/tarkatronic/django/forks","keys_url":"https://api.github.com/repos/tarkatronic/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tarkatronic/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tarkatronic/django/teams","hooks_url":"https://api.github.com/repos/tarkatronic/django/hooks","issue_events_url":"https://api.github.com/repos/tarkatronic/django/issues/events{/number}","events_url":"https://api.github.com/repos/tarkatronic/django/events","assignees_url":"https://api.github.com/repos/tarkatronic/django/assignees{/user}","branches_url":"https://api.github.com/repos/tarkatronic/django/branches{/branch}","tags_url":"https://api.github.com/repos/tarkatronic/django/tags","blobs_url":"https://api.github.com/repos/tarkatronic/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tarkatronic/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tarkatronic/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/tarkatronic/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tarkatronic/django/statuses/{sha}","languages_url":"https://api.github.com/repos/tarkatronic/django/languages","stargazers_url":"https://api.github.com/repos/tarkatronic/django/stargazers","contributors_url":"https://api.github.com/repos/tarkatronic/django/contributors","subscribers_url":"https://api.github.com/repos/tarkatronic/django/subscribers","subscription_url":"https://api.github.com/repos/tarkatronic/django/subscription","commits_url":"https://api.github.com/repos/tarkatronic/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/tarkatronic/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/tarkatronic/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/tarkatronic/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/tarkatronic/django/contents/{+path}","compare_url":"https://api.github.com/repos/tarkatronic/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tarkatronic/django/merges","archive_url":"https://api.github.com/repos/tarkatronic/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tarkatronic/django/downloads","issues_url":"https://api.github.com/repos/tarkatronic/django/issues{/number}","pulls_url":"https://api.github.com/repos/tarkatronic/django/pulls{/number}","milestones_url":"https://api.github.com/repos/tarkatronic/django/milestones{/number}","notifications_url":"https://api.github.com/repos/tarkatronic/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tarkatronic/django/labels{/name}","releases_url":"https://api.github.com/repos/tarkatronic/django/releases{/id}","deployments_url":"https://api.github.com/repos/tarkatronic/django/deployments","created_at":"2017-10-26T20:56:05Z","updated_at":"2017-10-26T20:56:31Z","pushed_at":"2018-02-15T12:27:04Z","git_url":"git://github.com/tarkatronic/django.git","ssh_url":"git@github.com:tarkatronic/django.git","clone_url":"https://github.com/tarkatronic/django.git","svn_url":"https://github.com/tarkatronic/django","homepage":"https://www.djangoproject.com/","size":174048,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"7ec0fdf62afd565dd9a888300e7e33d0bf3e5fd5","user":{"login":"django","id":27804,"avatar_url":"https://avatars2.githubusercontent.com/u/27804?v=4","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars2.githubusercontent.com/u/27804?v=4","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2018-02-15T12:28:12Z","pushed_at":"2018-02-15T12:27:07Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":174473,"stargazers_count":31790,"watchers_count":31790,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13426,"mirror_url":null,"archived":false,"open_issues_count":195,"license":null,"forks":13426,"open_issues":195,"watchers":31790,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/9666"},"html":{"href":"https://github.com/django/django/pull/9666"},"issue":{"href":"https://api.github.com/repos/django/django/issues/9666"},"comments":{"href":"https://api.github.com/repos/django/django/issues/9666/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/9666/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/9666/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/0e6c0789cfd7d691f114095c89a357a8709e03bb"}},"author_association":"NONE"}}
{"actor":{"display_login":"carltongibson"}}