<commit_before>from django.utils.translation import ugettext_lazy as _
from django.views.generic import View

from lily.search.lily_search import LilySearch
from lily.utils.views.mixins import LoginRequiredMixin, ExportListViewMixin


class ExportContactView(LoginRequiredMixin, ExportListViewMixin, View):
    http_method_names = ['get']
    file_name = 'contacts.csv'

    # ExportListViewMixin
    exportable_columns = {
        'id': {
            'headers': [_('ID')],
            'columns_for_item': ['id']
        },
        'url': {
            'headers': [_('url')],
            'columns_for_item': ['url']
        },
        'name': {
            'headers': [_('Name')],
            'columns_for_item': ['name']
        },
        'contactInformation': {
            'headers': [
                _('Email'),
                _('Phone numbers'),
            ],
            'columns_for_item': [
                'email_addresses',
                'phone_numbers',
            ]
        },
        'worksAt': {<commit_msg>Fixed name column for contact export<commit_after>from django.utils.translation import ugettext_lazy as _
from django.views.generic import View

from lily.search.lily_search import LilySearch
from lily.utils.views.mixins import LoginRequiredMixin, ExportListViewMixin


class ExportContactView(LoginRequiredMixin, ExportListViewMixin, View):
    http_method_names = ['get']
    file_name = 'contacts.csv'

    # ExportListViewMixin
    exportable_columns = {
        'id': {
            'headers': [_('ID')],
            'columns_for_item': ['id']
        },
        'url': {
            'headers': [_('url')],
            'columns_for_item': ['url']
        },
        'name': {
            'headers': [_('Name')],
            'columns_for_item': ['full_name']
        },
        'contactInformation': {
            'headers': [
                _('Email'),
                _('Phone numbers'),
            ],
            'columns_for_item': [
                'email_addresses',
                'phone_numbers',
            ]
        },
        'worksAt': {
{'fraction_non_alphanumeric': 0.13051823416506717, 'fraction_numerical': 0.0, 'mean_word_length': 1.9038997214484679, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6502105', 'n_tokens_mistral': 612, 'n_tokens_neox': 577, 'n_words': 109}