{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/67157849","id":67157849,"diff_hunk":"@@ -0,0 +1,85 @@\n+=====================\n+Model index reference\n+=====================\n+\n+.. module:: django.db.models.indexes\n+   :synopsis: Built-in index types.\n+\n+.. currentmodule:: django.db.models\n+\n+.. versionadded:: 1.11\n+\n+Index classes define a specific database index which can be created through\n+them. This document explains the API references of :class:`BaseIndex` which is\n+the base class for all other index classes. This includes the `index options`_\n+and `built-in indexes`_ Django offers. The indexes can be created in the\n+database via the :class:`~django.db.migrations.operations.AddIndex` class\n+as follows::\n+\n+    from django.db import migrations, models\n+\n+    class Migration(migrations.Migration):\n+\n+        operations = [\n+            migrations.AddIndex(\n+                model_name='Book',\n+                models.Index('title', 'author', name='my_index_name')  # An index on the title and author fields","path":"docs/ref/models/indexes.txt","position":26,"original_position":26,"commit_id":"b3b74ebbc16afdfb5370d3d8927de17d0998a9b2","original_commit_id":"b3b74ebbc16afdfb5370d3d8927de17d0998a9b2","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":"This gives: `SyntaxError: positional argument follows keyword argument`.\r\n\r\nAfter fixing that, I still get a traceback when trying to migrate:\r\n```\r\nFile \"/home/tim/code/django/django/db/migrations/operations/models.py\", line 748, in state_forwards\r\n    model_state.options['indexes'].append(self.index)\r\nKeyError: 'indexes'\r\n```","created_at":"2016-06-15T13:11:30Z","updated_at":"2016-06-15T13:11:30Z","html_url":"https://github.com/django/django/pull/6726#discussion_r67157849","pull_request_url":"https://api.github.com/repos/django/django/pulls/6726","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/67157849"},"html":{"href":"https://github.com/django/django/pull/6726#discussion_r67157849"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/6726"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/6726","id":72630732,"html_url":"https://github.com/django/django/pull/6726","diff_url":"https://github.com/django/django/pull/6726.diff","patch_url":"https://github.com/django/django/pull/6726.patch","issue_url":"https://api.github.com/repos/django/django/issues/6726","number":6726,"state":"open","locked":false,"title":"Fixed #26709 -- Add class based indexes and CreateIndex operation","user":{"login":"akki","id":4801628,"avatar_url":"https://avatars.githubusercontent.com/u/4801628?v=3","gravatar_id":"","url":"https://api.github.com/users/akki","html_url":"https://github.com/akki","followers_url":"https://api.github.com/users/akki/followers","following_url":"https://api.github.com/users/akki/following{/other_user}","gists_url":"https://api.github.com/users/akki/gists{/gist_id}","starred_url":"https://api.github.com/users/akki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akki/subscriptions","organizations_url":"https://api.github.com/users/akki/orgs","repos_url":"https://api.github.com/users/akki/repos","events_url":"https://api.github.com/users/akki/events{/privacy}","received_events_url":"https://api.github.com/users/akki/received_events","type":"User","site_admin":false},"body":"Ticket [#26709](https://code.djangoproject.com/ticket/26709).","created_at":"2016-06-05T14:29:12Z","updated_at":"2016-06-15T13:11:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"356e0c6261c7fe2222d05407d5a46aaabd9bf120","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/6726/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/6726/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/6726/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/b3b74ebbc16afdfb5370d3d8927de17d0998a9b2","head":{"label":"akki:gsoc-indexes","ref":"gsoc-indexes","sha":"b3b74ebbc16afdfb5370d3d8927de17d0998a9b2","user":{"login":"akki","id":4801628,"avatar_url":"https://avatars.githubusercontent.com/u/4801628?v=3","gravatar_id":"","url":"https://api.github.com/users/akki","html_url":"https://github.com/akki","followers_url":"https://api.github.com/users/akki/followers","following_url":"https://api.github.com/users/akki/following{/other_user}","gists_url":"https://api.github.com/users/akki/gists{/gist_id}","starred_url":"https://api.github.com/users/akki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akki/subscriptions","organizations_url":"https://api.github.com/users/akki/orgs","repos_url":"https://api.github.com/users/akki/repos","events_url":"https://api.github.com/users/akki/events{/privacy}","received_events_url":"https://api.github.com/users/akki/received_events","type":"User","site_admin":false},"repo":{"id":48555733,"name":"django","full_name":"akki/django","owner":{"login":"akki","id":4801628,"avatar_url":"https://avatars.githubusercontent.com/u/4801628?v=3","gravatar_id":"","url":"https://api.github.com/users/akki","html_url":"https://github.com/akki","followers_url":"https://api.github.com/users/akki/followers","following_url":"https://api.github.com/users/akki/following{/other_user}","gists_url":"https://api.github.com/users/akki/gists{/gist_id}","starred_url":"https://api.github.com/users/akki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akki/subscriptions","organizations_url":"https://api.github.com/users/akki/orgs","repos_url":"https://api.github.com/users/akki/repos","events_url":"https://api.github.com/users/akki/events{/privacy}","received_events_url":"https://api.github.com/users/akki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akki/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/akki/django","forks_url":"https://api.github.com/repos/akki/django/forks","keys_url":"https://api.github.com/repos/akki/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akki/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akki/django/teams","hooks_url":"https://api.github.com/repos/akki/django/hooks","issue_events_url":"https://api.github.com/repos/akki/django/issues/events{/number}","events_url":"https://api.github.com/repos/akki/django/events","assignees_url":"https://api.github.com/repos/akki/django/assignees{/user}","branches_url":"https://api.github.com/repos/akki/django/branches{/branch}","tags_url":"https://api.github.com/repos/akki/django/tags","blobs_url":"https://api.github.com/repos/akki/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akki/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akki/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/akki/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akki/django/statuses/{sha}","languages_url":"https://api.github.com/repos/akki/django/languages","stargazers_url":"https://api.github.com/repos/akki/django/stargazers","contributors_url":"https://api.github.com/repos/akki/django/contributors","subscribers_url":"https://api.github.com/repos/akki/django/subscribers","subscription_url":"https://api.github.com/repos/akki/django/subscription","commits_url":"https://api.github.com/repos/akki/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/akki/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/akki/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/akki/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/akki/django/contents/{+path}","compare_url":"https://api.github.com/repos/akki/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akki/django/merges","archive_url":"https://api.github.com/repos/akki/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akki/django/downloads","issues_url":"https://api.github.com/repos/akki/django/issues{/number}","pulls_url":"https://api.github.com/repos/akki/django/pulls{/number}","milestones_url":"https://api.github.com/repos/akki/django/milestones{/number}","notifications_url":"https://api.github.com/repos/akki/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akki/django/labels{/name}","releases_url":"https://api.github.com/repos/akki/django/releases{/id}","deployments_url":"https://api.github.com/repos/akki/django/deployments","created_at":"2015-12-24T20:15:07Z","updated_at":"2016-02-05T14:52:35Z","pushed_at":"2016-06-15T07:09:17Z","git_url":"git://github.com/akki/django.git","ssh_url":"git@github.com:akki/django.git","clone_url":"https://github.com/akki/django.git","svn_url":"https://github.com/akki/django","homepage":"https://www.djangoproject.com/","size":138541,"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":"1b407050dd53e56686fdd3e168f8cac4f9be8306","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}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2016-06-15T12:48:09Z","pushed_at":"2016-06-15T12:32:17Z","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":197361,"stargazers_count":19898,"watchers_count":19898,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8018,"mirror_url":null,"open_issues_count":95,"forks":8018,"open_issues":95,"watchers":19898,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/6726"},"html":{"href":"https://github.com/django/django/pull/6726"},"issue":{"href":"https://api.github.com/repos/django/django/issues/6726"},"comments":{"href":"https://api.github.com/repos/django/django/issues/6726/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/6726/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/6726/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/b3b74ebbc16afdfb5370d3d8927de17d0998a9b2"}}}}
{"actor":{"display_login":"timgraham"}}