<commit_before>from django.core import meta

class Document:
    fields = (
        meta.CharField('title', 'title', maxlength=200),
        meta.SlugField('slug', 'slug', unique=True, prepopulate_from=('title',)),
        meta.TextField('blurb', 'blurb', help_text='HTML is allowed.'),
        meta.CharField('doc_path', 'doc path', maxlength=200, 
            help_text="Relative to the docs directory in django SVN; leave off the file extension"),
        meta.DateTimeField('last_updated', 'last updated', auto_now=True),
    )
    ordering = (('title', 'ASC'),),
    admin = meta.Admin(
        fields = (
            (None, {'fields': ('title', 'slug', 'blurb', 'doc_path')}),
        ),
        list_display = ('title', 'doc_path'),
    )

    def __repr__(self):
        return self.title
        
    def get_absolute_url(self):
        return "/documentation/%s/" % self.slug
        
    def get_content(self):
        try:
            return self._doc_content
        except AttributeError:
            import os
            from django.conf.settings import DJANGO_DOCUMENT_ROOT_PATH
            doc_path = os.path.join(DJANGO_DOCUMENT_ROOT_PATH, "%s.html" % self.doc_path)
            if os.path.exists(doc_path):
                self._doc_content = open(doc_path).read()<commit_msg>Forgot to subclass meta.Model in [20]<commit_after>from django.core import meta

class Document(meta.Model):
    fields = (
        meta.CharField('title', 'title', maxlength=200),
        meta.SlugField('slug', 'slug', unique=True, prepopulate_from=('title',)),
        meta.TextField('blurb', 'blurb', help_text='HTML is allowed.'),
        meta.CharField('doc_path', 'doc path', maxlength=200, 
            help_text="Relative to the docs directory in django SVN; leave off the file extension"),
        meta.DateTimeField('last_updated', 'last updated', auto_now=True),
    )
    ordering = (('title', 'ASC'),),
    admin = meta.Admin(
        fields = (
            (None, {'fields': ('title', 'slug', 'blurb', 'doc_path')}),
        ),
        list_display = ('title', 'doc_path'),
    )

    def __repr__(self):
        return self.title
        
    def get_absolute_url(self):
        return "/documentation/%s/" % self.slug
        
    def get_content(self):
        try:
            return self._doc_content
        except AttributeError:
            import os
            from django.conf.settings import DJANGO_DOCUMENT_ROOT_PATH
            doc_path = os.path.join(DJANGO_DOCUMENT_ROOT_PATH, "%s.html" % self.doc_path)
            if os.path.exists(doc_path):
                self._doc_content = open(doc_path).read()
{'fraction_non_alphanumeric': 0.13622526636225266, 'fraction_numerical': 0.00532724505327245, 'mean_word_length': 2.505333333333333, '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': '3616119', 'n_tokens_mistral': 803, 'n_tokens_neox': 785, 'n_words': 174}