getsentry/sentry — pull request #765 by NickPresta (2013-02-06 04:12:50+00:00)
Title: Formats nested dictionaries in Additional Data on event details page

## Problem
When logging nested dictionaries, in Python for example, only the first level is formatted within the `Additional Data` section on the event details page.

This looks like:
![Screen Shot 2013-02-05 at 10 39 54 PM](https://f.cloud.github.com/assets/49090/130270/6503bc18-700f-11e2-83d0-19b324684b7f.png)

This isn't particularly user friendly or easy to read, especially if your data is large.

## Proposed Solution
Treat nested dictionaries like 'flat' dictionaries.

Now your data looks like:
![Screen Shot 2013-02-05 at 11 11 20 PM](https://f.cloud.github.com/assets/49090/130312/569409e0-7013-11e2-9b16-a6e8ec46b553.png)

This is easier to read, easier to use, and supports expanding arbitrary 'levels' of your data.

## Other things to note
* The style for the `Expand` link was updated to be the same height as the rest of the row. This is much nicer to look at and makes the `Additional Data` section look like a proper table.

* I rewrote the `varToggle` function to accept a jQuery selector (instead of ID attribute), to be more flexible. The reason for this is because I can't think of a good way to generate a unique ID.
I tried taking a slug of the key, which should be unique for a given dictionary. However, you will get duplicate slugs for keys with leading/trailing spaces - i.e. `slugify(' foobar baz') == slugify('foobar baz')`. I don't know if this is important in practice but it seems safer to assume this will break given this approach.