{"action":"opened","issue":{"url":"https://api.github.com/repos/wagtail/wagtail-personalisation/issues/180","repository_url":"https://api.github.com/repos/wagtail/wagtail-personalisation","labels_url":"https://api.github.com/repos/wagtail/wagtail-personalisation/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/wagtail/wagtail-personalisation/issues/180/comments","events_url":"https://api.github.com/repos/wagtail/wagtail-personalisation/issues/180/events","html_url":"https://github.com/wagtail/wagtail-personalisation/issues/180","id":338227909,"node_id":"MDU6SXNzdWUzMzgyMjc5MDk=","number":180,"title":"Registering model admin class in views.py?","user":{"login":"tm-kn","id":14931760,"node_id":"MDQ6VXNlcjE0OTMxNzYw","avatar_url":"https://avatars3.githubusercontent.com/u/14931760?v=4","gravatar_id":"","url":"https://api.github.com/users/tm-kn","html_url":"https://github.com/tm-kn","followers_url":"https://api.github.com/users/tm-kn/followers","following_url":"https://api.github.com/users/tm-kn/following{/other_user}","gists_url":"https://api.github.com/users/tm-kn/gists{/gist_id}","starred_url":"https://api.github.com/users/tm-kn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tm-kn/subscriptions","organizations_url":"https://api.github.com/users/tm-kn/orgs","repos_url":"https://api.github.com/users/tm-kn/repos","events_url":"https://api.github.com/users/tm-kn/events{/privacy}","received_events_url":"https://api.github.com/users/tm-kn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-04T10:52:57Z","updated_at":"2018-07-04T10:52:57Z","closed_at":null,"author_association":"MEMBER","body":"I am not quite sure if it's a good idea to register model admin class in the `views.py`. Keeping the modeladmin class & views sounds ok, but we probably should move the `modeladmin_register` call to wagtail_hooks.py as per the official documentation. I guess it gets registered as long as views.py is imported somewhere (probably `urls`), but I would not think it's reliable/future-proof/blessed by the documentation.\r\n\r\nCommit - https://github.com/wagtail/wagtail-personalisation/commit/32748b0d6f489eb845a1dfe2d904be1e6799fceb\r\n\r\nDocs - http://docs.wagtail.io/en/v2.1/reference/contrib/modeladmin/"}}
{"actor":{"display_login":"tm-kn"}}