{"action":"closed","issue":{"url":"https://api.github.com/repos/18F/tock/issues/173","labels_url":"https://api.github.com/repos/18F/tock/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/18F/tock/issues/173/comments","events_url":"https://api.github.com/repos/18F/tock/issues/173/events","html_url":"https://github.com/18F/tock/issues/173","id":87106006,"number":173,"title":"Newly added projects don't appear in the timecard selector","user":{"login":"shawnbot","id":113896,"avatar_url":"https://avatars.githubusercontent.com/u/113896?v=3","gravatar_id":"","url":"https://api.github.com/users/shawnbot","html_url":"https://github.com/shawnbot","followers_url":"https://api.github.com/users/shawnbot/followers","following_url":"https://api.github.com/users/shawnbot/following{/other_user}","gists_url":"https://api.github.com/users/shawnbot/gists{/gist_id}","starred_url":"https://api.github.com/users/shawnbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawnbot/subscriptions","organizations_url":"https://api.github.com/users/shawnbot/orgs","repos_url":"https://api.github.com/users/shawnbot/repos","events_url":"https://api.github.com/users/shawnbot/events{/privacy}","received_events_url":"https://api.github.com/users/shawnbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/18F/tock/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"shawnbot","id":113896,"avatar_url":"https://avatars.githubusercontent.com/u/113896?v=3","gravatar_id":"","url":"https://api.github.com/users/shawnbot","html_url":"https://github.com/shawnbot","followers_url":"https://api.github.com/users/shawnbot/followers","following_url":"https://api.github.com/users/shawnbot/following{/other_user}","gists_url":"https://api.github.com/users/shawnbot/gists{/gist_id}","starred_url":"https://api.github.com/users/shawnbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawnbot/subscriptions","organizations_url":"https://api.github.com/users/shawnbot/orgs","repos_url":"https://api.github.com/users/shawnbot/repos","events_url":"https://api.github.com/users/shawnbot/events{/privacy}","received_events_url":"https://api.github.com/users/shawnbot/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-06-10T21:00:47Z","updated_at":"2015-06-26T18:37:38Z","closed_at":"2015-06-26T18:37:38Z","body":"This means that the app needs to be redeployed whenever we add a new project. I tried to fix this in 7c967fa8d99c8fd4113300121f7f4ebb9fbc7ac0, but it looks like I didn't do this correctly. I *think* the way to do this is to define `ProjectChoiceField.choices` as a callable, like so:\r\n\r\n```python\r\nclass ProjectChoiceField(forms.ChoiceField):\r\n    widget = SelectWithData()\r\n    choices = projects_as_choices\r\n```\r\n\r\nThe [Django docs](https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.Field.choices) suggest that this might not work:\r\n\r\n> Note that choices can be any iterable object – not necessarily a list or tuple. This lets you construct choices dynamically. But if you find yourself hacking choices to be dynamic, you’re probably better off using a proper database table with a ForeignKey. choices is meant for static data that doesn’t change much, if ever.\r\n\r\n@jmcarp or @cmc333333, any ideas?"}}