{"action":"created","comment":{"url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/comments/173955934","pull_request_review_id":103230382,"id":173955934,"diff_hunk":"@@ -0,0 +1,72 @@\n+from django.db import models\n+\n+from django import forms\n+from django.forms.models import BaseModelForm, ModelFormMetaclass\n+from django.utils import six\n+\n+\n+class MagicFieldMixin(object):\n+    pass\n+\n+\n+class MagicFormMetaclass(ModelFormMetaclass):\n+    registry = {}\n+\n+    @classmethod\n+    def register_formfield_for_modelfield(cls, model_field, form_field):\n+        cls.registry[model_field] = form_field\n+\n+    @classmethod\n+    def get_meta(cls, name, bases, attrs):\n+        meta = attrs.get('Meta', None)\n+\n+        # Maybe the parent has a meta ?\n+        if meta is None:\n+            for parent in bases + type(cls).__mro__:\n+                meta = getattr(parent, 'Meta', None)\n+\n+                if meta is not None:\n+                    break\n+\n+        return meta","path":"src/dal_magic/forms.py","position":31,"original_position":31,"commit_id":"6974467262804f657d03695a04b57c774541c415","original_commit_id":"6974467262804f657d03695a04b57c774541c415","user":{"login":"jpic","id":94636,"avatar_url":"https://avatars3.githubusercontent.com/u/94636?v=4","gravatar_id":"","url":"https://api.github.com/users/jpic","html_url":"https://github.com/jpic","followers_url":"https://api.github.com/users/jpic/followers","following_url":"https://api.github.com/users/jpic/following{/other_user}","gists_url":"https://api.github.com/users/jpic/gists{/gist_id}","starred_url":"https://api.github.com/users/jpic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpic/subscriptions","organizations_url":"https://api.github.com/users/jpic/orgs","repos_url":"https://api.github.com/users/jpic/repos","events_url":"https://api.github.com/users/jpic/events{/privacy}","received_events_url":"https://api.github.com/users/jpic/received_events","type":"User","site_admin":false},"body":"This bad code should be replaced by: request.js.add('dal/dist.js')","created_at":"2018-03-12T21:41:16Z","updated_at":"2018-03-12T21:52:52Z","html_url":"https://github.com/yourlabs/django-autocomplete-light/pull/579#discussion_r173955934","pull_request_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/comments/173955934"},"html":{"href":"https://github.com/yourlabs/django-autocomplete-light/pull/579#discussion_r173955934"},"pull_request":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579"}}},"pull_request":{"url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579","id":58465633,"html_url":"https://github.com/yourlabs/django-autocomplete-light/pull/579","diff_url":"https://github.com/yourlabs/django-autocomplete-light/pull/579.diff","patch_url":"https://github.com/yourlabs/django-autocomplete-light/pull/579.patch","issue_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/579","number":579,"state":"open","locked":false,"title":"WIP - MagicForm","user":{"login":"jpic","id":94636,"avatar_url":"https://avatars3.githubusercontent.com/u/94636?v=4","gravatar_id":"","url":"https://api.github.com/users/jpic","html_url":"https://github.com/jpic","followers_url":"https://api.github.com/users/jpic/followers","following_url":"https://api.github.com/users/jpic/following{/other_user}","gists_url":"https://api.github.com/users/jpic/gists{/gist_id}","starred_url":"https://api.github.com/users/jpic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpic/subscriptions","organizations_url":"https://api.github.com/users/jpic/orgs","repos_url":"https://api.github.com/users/jpic/repos","events_url":"https://api.github.com/users/jpic/events{/privacy}","received_events_url":"https://api.github.com/users/jpic/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-02-05T18:25:45Z","updated_at":"2018-03-12T21:52:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e649a71fa449e6dae636742817f7403b29e4b7a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579/commits","review_comments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579/comments","review_comment_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/579/comments","statuses_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/statuses/6974467262804f657d03695a04b57c774541c415","head":{"label":"yourlabs:magicform","ref":"magicform","sha":"6974467262804f657d03695a04b57c774541c415","user":{"login":"yourlabs","id":1040547,"avatar_url":"https://avatars2.githubusercontent.com/u/1040547?v=4","gravatar_id":"","url":"https://api.github.com/users/yourlabs","html_url":"https://github.com/yourlabs","followers_url":"https://api.github.com/users/yourlabs/followers","following_url":"https://api.github.com/users/yourlabs/following{/other_user}","gists_url":"https://api.github.com/users/yourlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/yourlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yourlabs/subscriptions","organizations_url":"https://api.github.com/users/yourlabs/orgs","repos_url":"https://api.github.com/users/yourlabs/repos","events_url":"https://api.github.com/users/yourlabs/events{/privacy}","received_events_url":"https://api.github.com/users/yourlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":4213386,"name":"django-autocomplete-light","full_name":"yourlabs/django-autocomplete-light","owner":{"login":"yourlabs","id":1040547,"avatar_url":"https://avatars2.githubusercontent.com/u/1040547?v=4","gravatar_id":"","url":"https://api.github.com/users/yourlabs","html_url":"https://github.com/yourlabs","followers_url":"https://api.github.com/users/yourlabs/followers","following_url":"https://api.github.com/users/yourlabs/following{/other_user}","gists_url":"https://api.github.com/users/yourlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/yourlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yourlabs/subscriptions","organizations_url":"https://api.github.com/users/yourlabs/orgs","repos_url":"https://api.github.com/users/yourlabs/repos","events_url":"https://api.github.com/users/yourlabs/events{/privacy}","received_events_url":"https://api.github.com/users/yourlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yourlabs/django-autocomplete-light","description":"A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel","fork":false,"url":"https://api.github.com/repos/yourlabs/django-autocomplete-light","forks_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/forks","keys_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/teams","hooks_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/hooks","issue_events_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/events{/number}","events_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/events","assignees_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/assignees{/user}","branches_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/branches{/branch}","tags_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/tags","blobs_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/refs{/sha}","trees_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/statuses/{sha}","languages_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/languages","stargazers_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/stargazers","contributors_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/contributors","subscribers_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/subscribers","subscription_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/subscription","commits_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/commits{/sha}","git_commits_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/commits{/sha}","comments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/comments{/number}","issue_comment_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/comments{/number}","contents_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/contents/{+path}","compare_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/merges","archive_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/downloads","issues_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues{/number}","pulls_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls{/number}","milestones_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/milestones{/number}","notifications_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/labels{/name}","releases_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/releases{/id}","deployments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/deployments","created_at":"2012-05-03T11:49:37Z","updated_at":"2018-03-12T21:41:16Z","pushed_at":"2018-03-12T21:45:56Z","git_url":"git://github.com/yourlabs/django-autocomplete-light.git","ssh_url":"git@github.com:yourlabs/django-autocomplete-light.git","clone_url":"https://github.com/yourlabs/django-autocomplete-light.git","svn_url":"https://github.com/yourlabs/django-autocomplete-light","homepage":"https://django-autocomplete-light.readthedocs.io","size":12241,"stargazers_count":973,"watchers_count":973,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":300,"mirror_url":null,"archived":false,"open_issues_count":128,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":300,"open_issues":128,"watchers":973,"default_branch":"master"}},"base":{"label":"yourlabs:master","ref":"master","sha":"78b5701bb409590bc5da378602440a92c03e4f1a","user":{"login":"yourlabs","id":1040547,"avatar_url":"https://avatars2.githubusercontent.com/u/1040547?v=4","gravatar_id":"","url":"https://api.github.com/users/yourlabs","html_url":"https://github.com/yourlabs","followers_url":"https://api.github.com/users/yourlabs/followers","following_url":"https://api.github.com/users/yourlabs/following{/other_user}","gists_url":"https://api.github.com/users/yourlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/yourlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yourlabs/subscriptions","organizations_url":"https://api.github.com/users/yourlabs/orgs","repos_url":"https://api.github.com/users/yourlabs/repos","events_url":"https://api.github.com/users/yourlabs/events{/privacy}","received_events_url":"https://api.github.com/users/yourlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":4213386,"name":"django-autocomplete-light","full_name":"yourlabs/django-autocomplete-light","owner":{"login":"yourlabs","id":1040547,"avatar_url":"https://avatars2.githubusercontent.com/u/1040547?v=4","gravatar_id":"","url":"https://api.github.com/users/yourlabs","html_url":"https://github.com/yourlabs","followers_url":"https://api.github.com/users/yourlabs/followers","following_url":"https://api.github.com/users/yourlabs/following{/other_user}","gists_url":"https://api.github.com/users/yourlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/yourlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yourlabs/subscriptions","organizations_url":"https://api.github.com/users/yourlabs/orgs","repos_url":"https://api.github.com/users/yourlabs/repos","events_url":"https://api.github.com/users/yourlabs/events{/privacy}","received_events_url":"https://api.github.com/users/yourlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yourlabs/django-autocomplete-light","description":"A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel","fork":false,"url":"https://api.github.com/repos/yourlabs/django-autocomplete-light","forks_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/forks","keys_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/teams","hooks_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/hooks","issue_events_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/events{/number}","events_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/events","assignees_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/assignees{/user}","branches_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/branches{/branch}","tags_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/tags","blobs_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/refs{/sha}","trees_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/statuses/{sha}","languages_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/languages","stargazers_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/stargazers","contributors_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/contributors","subscribers_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/subscribers","subscription_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/subscription","commits_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/commits{/sha}","git_commits_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/git/commits{/sha}","comments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/comments{/number}","issue_comment_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/comments{/number}","contents_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/contents/{+path}","compare_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/merges","archive_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/downloads","issues_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues{/number}","pulls_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls{/number}","milestones_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/milestones{/number}","notifications_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/labels{/name}","releases_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/releases{/id}","deployments_url":"https://api.github.com/repos/yourlabs/django-autocomplete-light/deployments","created_at":"2012-05-03T11:49:37Z","updated_at":"2018-03-12T21:41:16Z","pushed_at":"2018-03-12T21:45:56Z","git_url":"git://github.com/yourlabs/django-autocomplete-light.git","ssh_url":"git@github.com:yourlabs/django-autocomplete-light.git","clone_url":"https://github.com/yourlabs/django-autocomplete-light.git","svn_url":"https://github.com/yourlabs/django-autocomplete-light","homepage":"https://django-autocomplete-light.readthedocs.io","size":12241,"stargazers_count":973,"watchers_count":973,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":300,"mirror_url":null,"archived":false,"open_issues_count":128,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":300,"open_issues":128,"watchers":973,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579"},"html":{"href":"https://github.com/yourlabs/django-autocomplete-light/pull/579"},"issue":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/579"},"comments":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/issues/579/comments"},"review_comments":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579/comments"},"review_comment":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/pulls/579/commits"},"statuses":{"href":"https://api.github.com/repos/yourlabs/django-autocomplete-light/statuses/6974467262804f657d03695a04b57c774541c415"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jpic"}}