{"action":"created","issue":{"url":"https://api.github.com/repos/littleweaver/django-brambling/issues/573","labels_url":"https://api.github.com/repos/littleweaver/django-brambling/issues/573/labels{/name}","comments_url":"https://api.github.com/repos/littleweaver/django-brambling/issues/573/comments","events_url":"https://api.github.com/repos/littleweaver/django-brambling/issues/573/events","html_url":"https://github.com/littleweaver/django-brambling/pull/573","id":101761082,"number":573,"title":"Allow exporting the Finances table as a CSV","user":{"login":"chigby","id":561931,"avatar_url":"https://avatars.githubusercontent.com/u/561931?v=3","gravatar_id":"","url":"https://api.github.com/users/chigby","html_url":"https://github.com/chigby","followers_url":"https://api.github.com/users/chigby/followers","following_url":"https://api.github.com/users/chigby/following{/other_user}","gists_url":"https://api.github.com/users/chigby/gists{/gist_id}","starred_url":"https://api.github.com/users/chigby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chigby/subscriptions","organizations_url":"https://api.github.com/users/chigby/orgs","repos_url":"https://api.github.com/users/chigby/repos","events_url":"https://api.github.com/users/chigby/events{/privacy}","received_events_url":"https://api.github.com/users/chigby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"melinath","id":299979,"avatar_url":"https://avatars.githubusercontent.com/u/299979?v=3","gravatar_id":"","url":"https://api.github.com/users/melinath","html_url":"https://github.com/melinath","followers_url":"https://api.github.com/users/melinath/followers","following_url":"https://api.github.com/users/melinath/following{/other_user}","gists_url":"https://api.github.com/users/melinath/gists{/gist_id}","starred_url":"https://api.github.com/users/melinath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melinath/subscriptions","organizations_url":"https://api.github.com/users/melinath/orgs","repos_url":"https://api.github.com/users/melinath/repos","events_url":"https://api.github.com/users/melinath/events{/privacy}","received_events_url":"https://api.github.com/users/melinath/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-08-18T22:14:34Z","updated_at":"2015-08-25T21:39:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/littleweaver/django-brambling/pulls/573","html_url":"https://github.com/littleweaver/django-brambling/pull/573","diff_url":"https://github.com/littleweaver/django-brambling/pull/573.diff","patch_url":"https://github.com/littleweaver/django-brambling/pull/573.patch"},"body":"Puts a button the Finances page that exports what's on the table as a CSV. \r\n\r\nImplementation-wise, it's highly possible this could be more idiomatically Django. My strategy was to make a Python class that controls the formatting logic (which I copied from the template) and call it from the view. In theory this class could also be used to generate the data in the template -- with some tweaking (e.g. generating a link for the order number). \r\n\r\nPossible open questions:\r\n\r\n * Button positioning. It doesn't match the Attendees or Orders pages, but is possibly more obvious without all the rest of the controls. My technique here is called \"don't mess with CSS until absolutely necessary.\"\r\n * I might be doing unnecessary work to get the timezone right in `format_timestamp`. The template uses a special function I couldn't really get to work in the view.\r\n * It worked for my trivial data set (1 transaction), but it might not for something larger. If there's an easy way for me to get a bunch of seed data, that could be handy. Or at least test the CSV code against something more closely resembling the actual data.\r\n\r\nSo! Hope it seems good."},"comment":{"url":"https://api.github.com/repos/littleweaver/django-brambling/issues/comments/134749763","html_url":"https://github.com/littleweaver/django-brambling/pull/573#issuecomment-134749763","issue_url":"https://api.github.com/repos/littleweaver/django-brambling/issues/573","id":134749763,"user":{"login":"melinath","id":299979,"avatar_url":"https://avatars.githubusercontent.com/u/299979?v=3","gravatar_id":"","url":"https://api.github.com/users/melinath","html_url":"https://github.com/melinath","followers_url":"https://api.github.com/users/melinath/followers","following_url":"https://api.github.com/users/melinath/following{/other_user}","gists_url":"https://api.github.com/users/melinath/gists{/gist_id}","starred_url":"https://api.github.com/users/melinath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melinath/subscriptions","organizations_url":"https://api.github.com/users/melinath/orgs","repos_url":"https://api.github.com/users/melinath/repos","events_url":"https://api.github.com/users/melinath/events{/privacy}","received_events_url":"https://api.github.com/users/melinath/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T21:39:34Z","updated_at":"2015-08-25T21:39:34Z","body":"A couple comments above ^ but not blocking things. I'm gonna go ahead and merge this. Congratulations!"}}