<commit_before>from django.core.urlresolvers import reverse
from django.db import models
from djorm_pgfulltext.fields import VectorField
from djorm_pgfulltext.models import SearchManager


class Author(models.Model):
    name = models.CharField(max_length=100, unique=True)
    date_of_birth = models.DateField()
    date_of_death = models.DateField(null=True, blank=True)

    search_index = VectorField()

    objects = SearchManager(
        fields=('name',),
        config='pg_catalog.english',
        search_field='search_index',
        auto_update_search_field=True
    )

    def __str__(self):
        return self.name


class Quotation(models.Model):
    author = models.ForeignKey(Author, related_name='underquoted')
    text = models.CharField(max_length=500, unique=True)

    search_index = VectorField()

    objects = SearchManager(
        fields=('text',),
        config='pg_catalog.english',
        search_field='search_index',
        auto_update_search_field=True
    )

    def __str__(self):<commit_msg>Order authors alphabetically<commit_after>from django.core.urlresolvers import reverse
from django.db import models
from djorm_pgfulltext.fields import VectorField
from djorm_pgfulltext.models import SearchManager


class Author(models.Model):

    class Meta:
        ordering = ('name',)

    name = models.CharField(max_length=100, unique=True)
    date_of_birth = models.DateField()
    date_of_death = models.DateField(null=True, blank=True)

    search_index = VectorField()

    objects = SearchManager(
        fields=('name',),
        config='pg_catalog.english',
        search_field='search_index',
        auto_update_search_field=True
    )

    def __str__(self):
        return self.name


class Quotation(models.Model):
    author = models.ForeignKey(Author, related_name='underquoted')
    text = models.CharField(max_length=500, unique=True)

    search_index = VectorField()

    objects = SearchManager(
        fields=('text',),
        config='pg_catalog.english',
        search_field='search_index',
        auto_update_search_field=True
    )

    def __str__(self):
{'fraction_non_alphanumeric': 0.0994344957587182, 'fraction_numerical': 0.005655042412818096, 'mean_word_length': 3.6969026548672566, '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': '5791024', 'n_tokens_mistral': 658, 'n_tokens_neox': 627, 'n_words': 117}