<commit_before># coding: utf-8

from __future__ import unicode_literals
from django_tables2 import Table
from django_tables2.columns import Column, LinkColumn, CheckBoxColumn
from django_tables2.utils import A
from django.utils.translation import ugettext_lazy as _


class OeuvreTable(Table):
    genre = Column()
    titre = LinkColumn('oeuvre_detail', args=(A('slug'),), verbose_name=_('titre'))
    titre_secondaire = Column()
    auteurs = Column(accessor='auteurs_html', verbose_name=_('auteurs'),
                          order_by='auteurs__individu__nom')

    class Meta:
        attrs = {'class': 'paleblue'}


class IndividuTable(Table):
    calc_fav_prenoms = Column(verbose_name=_('prénoms'),
                              order_by=('prenoms__prenom',))
    nom = LinkColumn('individu_detail', args=(A('slug'),), accessor='nom_seul',
                     order_by=('pseudonyme', 'nom',))
    professions = Column(accessor='calc_professions',
                         verbose_name=_('professions'),
                         order_by=('professions__nom',))
    naissance = Column(verbose_name=_('naissance'),
                       order_by='ancrage_naissance')
    deces = Column(verbose_name=_('décès'), order_by='ancrage_deces')

    class Meta:
        attrs = {'class': 'paleblue'}


class ProfessionTable(Table):
    # selection = CheckBoxColumn(accessor='pk')
    nom = LinkColumn('profession_detail', args=(A('slug'),), verbose_name=_('nom'))
    individus_count = Column(accessor='individus.count', orderable=False,
                             verbose_name=_('nombre d’individus'))
    oeuvres_count = Column(accessor='auteurs.oeuvres.count', orderable=False,
                           verbose_name=_('nombre d’œuvres'))

    class Meta:
        attrs = {'class': 'paleblue'}


class PartieTable(Table):
    nom = LinkColumn('partie_detail', args=(A('slug'),),
                     verbose_name=_('nom'))
    interpretes = Column(accessor='interpretes_html',
                 verbose_name=_('interprètes'),
                 order_by='pupitres__elements_de_distribution__individus__nom')

    class Meta:
        attrs = {'class': 'paleblue'}<commit_msg>Écrit catalogue.tables.__all__<commit_after># coding: utf-8

from __future__ import unicode_literals
from django_tables2 import Table
from django_tables2.columns import Column, LinkColumn, CheckBoxColumn
from django_tables2.utils import A
from django.utils.translation import ugettext_lazy as _


__all__ = (b'OeuvreTable', b'IndividuTable', b'ProfessionTable',
           b'PartieTable')


class OeuvreTable(Table):
    genre = Column()
    titre = LinkColumn('oeuvre_detail', args=(A('slug'),),
                       verbose_name=_('titre'))
    titre_secondaire = Column()
    auteurs = Column(accessor='auteurs_html', verbose_name=_('auteurs'),
                          order_by='auteurs__individu__nom')

    class Meta:
        attrs = {'class': 'paleblue'}


class IndividuTable(Table):
    calc_fav_prenoms = Column(verbose_name=_('prénoms'),
                              order_by=('prenoms__prenom',))
    nom = LinkColumn('individu_detail', args=(A('slug'),), accessor='nom_seul',
                     order_by=('pseudonyme', 'nom',))
    professions = Column(accessor='calc_professions',
                         verbose_name=_('professions'),
                         order_by=('professions__nom',))
    naissance = Column(verbose_name=_('naissance'),
                       order_by='ancrage_naissance')
    deces = Column(verbose_name=_('décès'), order_by='ancrage_deces')

    class Meta:
        attrs = {'class': 'paleblue'}


class ProfessionTable(Table):
    # selection = CheckBoxColumn(accessor='pk')
    nom = LinkColumn('profession_detail', args=(A('slug'),),
                     verbose_name=_('nom'))
    individus_count = Column(accessor='individus.count', orderable=False,
                             verbose_name=_('nombre d’individus'))
    oeuvres_count = Column(accessor='auteurs.oeuvres.count', orderable=False,
                           verbose_name=_('nombre d’œuvres'))

    class Meta:
        attrs = {'class': 'paleblue'}


class PartieTable(Table):
    nom = LinkColumn('partie_detail', args=(A('slug'),),
                     verbose_name=_('nom'))
    interpretes = Column(accessor='interpretes_html',
                 verbose_name=_('interprètes'),
                 order_by='pupitres__elements_de_distribution__individus__nom')

    class Meta:
        attrs = {'class': 'paleblue'}
{'fraction_non_alphanumeric': 0.12957621477701353, 'fraction_numerical': 0.0017750166407810074, 'mean_word_length': 3.079638009049774, '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': '4183474', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1366, 'n_words': 223}