{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/40423730","id":40423730,"diff_hunk":"@@ -511,6 +511,20 @@ On the other hand, if you are using a plain ``FormSet``, it's up to you to\n handle ``formset.deleted_forms``, perhaps in your formset's ``save()`` method,\n as there's no general notion of what it means to delete a form.\n \n+``can_delete_extra``\n+~~~~~~~~~~~~~~~~~~~~\n+\n+.. attribute:: BaseFormSet.can_delete_extra\n+\n+Default: ``True``\n+\n+While setting ``can_delete=True``, specifying ``can_delete_extra=False`` will\n+remove the option to delete extra forms.\n+\n+.. versionadded:: 1.10","path":"docs/topics/forms/formsets.txt","position":27,"original_position":27,"commit_id":"663b78439f2fd0ead7256ff04d94134d7d97afe6","original_commit_id":"663b78439f2fd0ead7256ff04d94134d7d97afe6","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"Since this applies to the attribute, you can put `.. versionadded:: 1.10` below `.. attribute::` without the \"... was added\" sentence.","created_at":"2015-09-25T12:23:46Z","updated_at":"2015-09-25T12:23:46Z","html_url":"https://github.com/django/django/pull/5323#discussion_r40423730","pull_request_url":"https://api.github.com/repos/django/django/pulls/5323","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/40423730"},"html":{"href":"https://github.com/django/django/pull/5323#discussion_r40423730"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/5323"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/5323","id":45518787,"html_url":"https://github.com/django/django/pull/5323","diff_url":"https://github.com/django/django/pull/5323.diff","patch_url":"https://github.com/django/django/pull/5323.patch","issue_url":"https://api.github.com/repos/django/django/issues/5323","number":5323,"state":"open","locked":false,"title":"Fixed #9061 -- Added 'can_delete_extra' option to BaseFormSet","user":{"login":"danielward","id":303471,"avatar_url":"https://avatars.githubusercontent.com/u/303471?v=3","gravatar_id":"","url":"https://api.github.com/users/danielward","html_url":"https://github.com/danielward","followers_url":"https://api.github.com/users/danielward/followers","following_url":"https://api.github.com/users/danielward/following{/other_user}","gists_url":"https://api.github.com/users/danielward/gists{/gist_id}","starred_url":"https://api.github.com/users/danielward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielward/subscriptions","organizations_url":"https://api.github.com/users/danielward/orgs","repos_url":"https://api.github.com/users/danielward/repos","events_url":"https://api.github.com/users/danielward/events{/privacy}","received_events_url":"https://api.github.com/users/danielward/received_events","type":"User","site_admin":false},"body":"Apologies, this is a follow-up to a previously-closed PR (#4772) as I hadn't responded in time. I've made all suggested improvements and submitted the new PR as advised.\r\n\r\nAdded in the `can_delete_extra` option along with supporting tests and documentation updates. This option, when set to `False` will prevent the deletion option from displaying for extra forms in formsets.\r\n\r\nFor further information - https://code.djangoproject.com/ticket/9061","created_at":"2015-09-21T07:02:40Z","updated_at":"2015-09-25T12:23:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3846d7b1108844acac38a2894423bc8a9b4d8401","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/5323/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/5323/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/5323/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/663b78439f2fd0ead7256ff04d94134d7d97afe6","head":{"label":"danielward:ticket_9061","ref":"ticket_9061","sha":"663b78439f2fd0ead7256ff04d94134d7d97afe6","user":{"login":"danielward","id":303471,"avatar_url":"https://avatars.githubusercontent.com/u/303471?v=3","gravatar_id":"","url":"https://api.github.com/users/danielward","html_url":"https://github.com/danielward","followers_url":"https://api.github.com/users/danielward/followers","following_url":"https://api.github.com/users/danielward/following{/other_user}","gists_url":"https://api.github.com/users/danielward/gists{/gist_id}","starred_url":"https://api.github.com/users/danielward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielward/subscriptions","organizations_url":"https://api.github.com/users/danielward/orgs","repos_url":"https://api.github.com/users/danielward/repos","events_url":"https://api.github.com/users/danielward/events{/privacy}","received_events_url":"https://api.github.com/users/danielward/received_events","type":"User","site_admin":false},"repo":{"id":36852989,"name":"django","full_name":"danielward/django","owner":{"login":"danielward","id":303471,"avatar_url":"https://avatars.githubusercontent.com/u/303471?v=3","gravatar_id":"","url":"https://api.github.com/users/danielward","html_url":"https://github.com/danielward","followers_url":"https://api.github.com/users/danielward/followers","following_url":"https://api.github.com/users/danielward/following{/other_user}","gists_url":"https://api.github.com/users/danielward/gists{/gist_id}","starred_url":"https://api.github.com/users/danielward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielward/subscriptions","organizations_url":"https://api.github.com/users/danielward/orgs","repos_url":"https://api.github.com/users/danielward/repos","events_url":"https://api.github.com/users/danielward/events{/privacy}","received_events_url":"https://api.github.com/users/danielward/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielward/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/danielward/django","forks_url":"https://api.github.com/repos/danielward/django/forks","keys_url":"https://api.github.com/repos/danielward/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielward/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielward/django/teams","hooks_url":"https://api.github.com/repos/danielward/django/hooks","issue_events_url":"https://api.github.com/repos/danielward/django/issues/events{/number}","events_url":"https://api.github.com/repos/danielward/django/events","assignees_url":"https://api.github.com/repos/danielward/django/assignees{/user}","branches_url":"https://api.github.com/repos/danielward/django/branches{/branch}","tags_url":"https://api.github.com/repos/danielward/django/tags","blobs_url":"https://api.github.com/repos/danielward/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielward/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielward/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielward/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielward/django/statuses/{sha}","languages_url":"https://api.github.com/repos/danielward/django/languages","stargazers_url":"https://api.github.com/repos/danielward/django/stargazers","contributors_url":"https://api.github.com/repos/danielward/django/contributors","subscribers_url":"https://api.github.com/repos/danielward/django/subscribers","subscription_url":"https://api.github.com/repos/danielward/django/subscription","commits_url":"https://api.github.com/repos/danielward/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielward/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielward/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielward/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielward/django/contents/{+path}","compare_url":"https://api.github.com/repos/danielward/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielward/django/merges","archive_url":"https://api.github.com/repos/danielward/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielward/django/downloads","issues_url":"https://api.github.com/repos/danielward/django/issues{/number}","pulls_url":"https://api.github.com/repos/danielward/django/pulls{/number}","milestones_url":"https://api.github.com/repos/danielward/django/milestones{/number}","notifications_url":"https://api.github.com/repos/danielward/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielward/django/labels{/name}","releases_url":"https://api.github.com/repos/danielward/django/releases{/id}","created_at":"2015-06-04T06:40:07Z","updated_at":"2015-06-04T06:40:21Z","pushed_at":"2015-09-24T13:14:45Z","git_url":"git://github.com/danielward/django.git","ssh_url":"git@github.com:danielward/django.git","clone_url":"https://github.com/danielward/django.git","svn_url":"https://github.com/danielward/django","homepage":"https://www.djangoproject.com/","size":145835,"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":"django:master","ref":"master","sha":"8dc3ba5cebcf19a4013542e7c2f5faea73a02724","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","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://avatars.githubusercontent.com/u/27804?v=3","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}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-09-25T10:24:59Z","pushed_at":"2015-09-25T11:15:58Z","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":313751,"stargazers_count":16091,"watchers_count":16091,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6483,"mirror_url":null,"open_issues_count":55,"forks":6483,"open_issues":55,"watchers":16091,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/5323"},"html":{"href":"https://github.com/django/django/pull/5323"},"issue":{"href":"https://api.github.com/repos/django/django/issues/5323"},"comments":{"href":"https://api.github.com/repos/django/django/issues/5323/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/5323/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/5323/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/663b78439f2fd0ead7256ff04d94134d7d97afe6"}}}}