Skip to content

Conversation

steventlamb
Copy link
Contributor

No description provided.

Steve Lamb added 3 commits February 4, 2014 16:19
At the cost of transparency.
Walking relationships is supported, via qs.values('model__field'), but the field names were not being included in the column header. This is because the name_map was being build from fields in queryset.model._meta.fields (which was done so that verbose_name was accessible), which does not have a concept of relations. This correct first builds from the field names of the queryset, and then overwrites with the verbose names from the model.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it maps fields to themselves...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does. field_names is a list, name_map is a key mapping field_names to themselves. Then, we overwrite some of these values with verbose_names.

@maurizi
Copy link
Contributor

maurizi commented Feb 4, 2014

+1

steventlamb pushed a commit that referenced this pull request Feb 4, 2014
@steventlamb steventlamb merged commit b59dc54 into azavea:master Feb 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants