{"action":"created","issue":{"url":"https://api.github.com/repos/praekelt/django-formfactory/issues/48","repository_url":"https://api.github.com/repos/praekelt/django-formfactory","labels_url":"https://api.github.com/repos/praekelt/django-formfactory/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/praekelt/django-formfactory/issues/48/comments","events_url":"https://api.github.com/repos/praekelt/django-formfactory/issues/48/events","html_url":"https://github.com/praekelt/django-formfactory/issues/48","id":205870105,"number":48,"title":"Allow field choices to be selected from a model","user":{"login":"qoda","id":125271,"avatar_url":"https://avatars.githubusercontent.com/u/125271?v=3","gravatar_id":"","url":"https://api.github.com/users/qoda","html_url":"https://github.com/qoda","followers_url":"https://api.github.com/users/qoda/followers","following_url":"https://api.github.com/users/qoda/following{/other_user}","gists_url":"https://api.github.com/users/qoda/gists{/gist_id}","starred_url":"https://api.github.com/users/qoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qoda/subscriptions","organizations_url":"https://api.github.com/users/qoda/orgs","repos_url":"https://api.github.com/users/qoda/repos","events_url":"https://api.github.com/users/qoda/events{/privacy}","received_events_url":"https://api.github.com/users/qoda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-07T12:15:19Z","updated_at":"2017-02-07T15:03:28Z","closed_at":null,"body":"The field model needs a choice generic fk field to a enum provider. The enum model would need to have an items related name which points to an enum items model containing `key` and `value` fields. Example below. \r\n\r\n```\r\nfrom django.db import models\r\n\r\n\r\nclass Enum(models.Model):\r\n    title = models.CharField(max_length=100)\r\n\r\n\r\nclass EnumItem(models.Model):\r\n    enum = models.ForeignKey(Enum, related_name=\"items\")\r\n    value = models.CharField(max_length=100)\r\n    label = models.CharField(max_length=100)\r\n```"},"comment":{"url":"https://api.github.com/repos/praekelt/django-formfactory/issues/comments/278025767","html_url":"https://github.com/praekelt/django-formfactory/issues/48#issuecomment-278025767","issue_url":"https://api.github.com/repos/praekelt/django-formfactory/issues/48","id":278025767,"user":{"login":"qoda","id":125271,"avatar_url":"https://avatars.githubusercontent.com/u/125271?v=3","gravatar_id":"","url":"https://api.github.com/users/qoda","html_url":"https://github.com/qoda","followers_url":"https://api.github.com/users/qoda/followers","following_url":"https://api.github.com/users/qoda/following{/other_user}","gists_url":"https://api.github.com/users/qoda/gists{/gist_id}","starred_url":"https://api.github.com/users/qoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qoda/subscriptions","organizations_url":"https://api.github.com/users/qoda/orgs","repos_url":"https://api.github.com/users/qoda/repos","events_url":"https://api.github.com/users/qoda/events{/privacy}","received_events_url":"https://api.github.com/users/qoda/received_events","type":"User","site_admin":false},"created_at":"2017-02-07T15:03:27Z","updated_at":"2017-02-07T15:03:27Z","body":"PR @ https://github.com/praekelt/django-formfactory/pull/49"}}
{"actor":{"display_login":"qoda"}}