<commit_before>#!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site

from opps.core.models.date import Date

from datetime import datetime



class PublishableMnager(models.Manager):
    def all_published(self):
        return super(PublishableMnager, self).get_query_set().filter(
                date_available__lte=datetime.now(), published=True)


class Publishable(Date):

    user = models.ForeignKey(settings.AUTH_USER_MODEL)
    site = models.ForeignKey(Site, default=0)
    date_available = models.DateTimeField(_(u"Date available"),
            default=datetime.now, null=True)
    published = models.BooleanField(_(u"Published"), default=False)

    objects = PublishableMnager()

    class Meta:
        abstract = True

    def is_published(self):
        return self.published and \
                self.date_available.replace(tzinfo=None) <= datetime.now()
<commit_msg>Fix spelling error on core published PublishableMnager to PublishableManager<commit_after>#!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site

from opps.core.models.date import Date

from datetime import datetime



class PublishableManager(models.Manager):
    def all_published(self):
        return super(PublishableManager, self).get_query_set().filter(
                date_available__lte=datetime.now(), published=True)


class Publishable(Date):

    user = models.ForeignKey(settings.AUTH_USER_MODEL)
    site = models.ForeignKey(Site, default=0)
    date_available = models.DateTimeField(_(u"Date available"),
            default=datetime.now, null=True)
    published = models.BooleanField(_(u"Published"), default=False)

    objects = PublishableManager()

    class Meta:
        abstract = True

    def is_published(self):
        return self.published and \
                self.date_available.replace(tzinfo=None) <= datetime.now()

{'fraction_non_alphanumeric': 0.09246901811248809, 'fraction_numerical': 0.0009532888465204957, 'mean_word_length': 3.8475750577367207, 'pattern_counts': {'":': 0, '<': 5, '<?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': '795243', 'n_tokens_mistral': 598, 'n_tokens_neox': 578, 'n_words': 136}