<commit_before>======================
Database API reference
======================

Once you've created your `data models`_, Django automatically gives you a
database-abstraction API that lets you create, retrieve, update and delete
objects. This document explains that API.

.. _`data models`: http://www.djangoproject.com/documentation/model_api/

Throughout this reference, we'll refer to the following models, which comprise
a weblog application::

    class Blog(models.Model):
        name = models.CharField(maxlength=100)
        tagline = models.TextField()

        def __str__(self):
            return self.name

    class Author(models.Model):
        name = models.CharField(maxlength=50)
        email = models.URLField()

        class __str__(self):
            return self.name

    class Entry(models.Model):<commit_msg>Fixed #1779 -- Fixed typo in docs/db-api.txt. Thanks, <EMAIL><commit_after>======================
Database API reference
======================

Once you've created your `data models`_, Django automatically gives you a
database-abstraction API that lets you create, retrieve, update and delete
objects. This document explains that API.

.. _`data models`: http://www.djangoproject.com/documentation/model_api/

Throughout this reference, we'll refer to the following models, which comprise
a weblog application::

    class Blog(models.Model):
        name = models.CharField(maxlength=100)
        tagline = models.TextField()

        def __str__(self):
            return self.name

    class Author(models.Model):
        name = models.CharField(maxlength=50)
        email = models.URLField()

        def __str__(self):
            return self.name

    class Entry(models.Model):
{'fraction_non_alphanumeric': 0.13557358053302435, 'fraction_numerical': 0.008111239860950173, 'mean_word_length': 3.4168797953964196, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5346474', 'n_tokens_mistral': 482, 'n_tokens_neox': 433, 'n_words': 146}