# Path: easy_news/settings.py
#     NEWS_TAGGING = getattr(settings, 'NEWS_TAGGING', True)
#         NEWS_TAGGING = getattr(settings, 'NEWS_TAGGING', False)
#         NEWS_TAGGING = False
# ENABLE_NEWS_LIST = getattr(settings, 'ENABLE_NEWS_LIST', True)
# ENABLE_NEWS_ARCHIVE_INDEX = getattr(settings, 'ENABLE_NEWS_ARCHIVE_INDEX', True)
# ENABLE_NEWS_DATE_ARCHIVE = getattr(settings, 'ENABLE_NEWS_DATE_ARCHIVE', True)
# ADMIN_EXTRA_CLASS = getattr(settings, 'NEWS_ADMIN_EXTRA_CLASS', {'all': ''})
# ADMIN_EXTRA_CSS = getattr(settings, 'NEWS_ADMIN_EXTRA_CSS', {'all': ['']})


from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse
from easy_news import settings as news_settings
from django.utils import timezone
    from tinymce.models import HTMLField
    from django.db.models.fields import TextField as HTMLField
        from tagging import fields

    date = models.DateField(verbose_name=_('Publication date'), default=timezone.now)
    creation_date = models.DateField(verbose_name=_('Creation date'), auto_now_add=True)

    short = models.TextField(verbose_name=_('Short description'), default='', blank=True)
    text = HTMLField(verbose_name=_('main content'), default='', blank=True)

    if news_settings.NEWS_TAGGING:
        tags = fields.TagField(null=True)

    def month(self):
        return MONTHS[self.date.month - 1]

    def save(self, *args, **kwds):
        need_update = False
        if self.slug is None:
            if self.id is None:
                need_update = True
                self.slug = ''
            else:
                self.slug = self.id
        super(News, self).save(*args, **kwds)
        if need_update:
            self.slug = self.id
            super(News, self).save(force_update=True)
    save.alters_data = True

    def get_absolute_url(self):
        return reverse('news_detail', kwargs={
            'year': '%04d' % self.date.year,

# Path: easy_news/settings.py
#     NEWS_TAGGING = getattr(settings, 'NEWS_TAGGING', True)
#         NEWS_TAGGING = getattr(settings, 'NEWS_TAGGING', False)
#         NEWS_TAGGING = False
# ENABLE_NEWS_LIST = getattr(settings, 'ENABLE_NEWS_LIST', True)
# ENABLE_NEWS_ARCHIVE_INDEX = getattr(settings, 'ENABLE_NEWS_ARCHIVE_INDEX', True)
# ENABLE_NEWS_DATE_ARCHIVE = getattr(settings, 'ENABLE_NEWS_DATE_ARCHIVE', True)
# ADMIN_EXTRA_CLASS = getattr(settings, 'NEWS_ADMIN_EXTRA_CLASS', {'all': ''})
# ADMIN_EXTRA_CSS = getattr(settings, 'NEWS_ADMIN_EXTRA_CSS', {'all': ['']})


# Path: easy_news/models.py
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse
from easy_news import settings as news_settings
from django.utils import timezone
    from tinymce.models import HTMLField
    from django.db.models.fields import TextField as HTMLField
        from tagging import fields


    date = models.DateField(verbose_name=_('Publication date'), default=timezone.now)
    creation_date = models.DateField(verbose_name=_('Creation date'), auto_now_add=True)

    short = models.TextField(verbose_name=_('Short description'), default='', blank=True)
    text = HTMLField(verbose_name=_('main content'), default='', blank=True)

    if news_settings.NEWS_TAGGING:
        tags = fields.TagField(null=True)

    def month(self):
        return MONTHS[self.date.month - 1]

    def save(self, *args, **kwds):
        need_update = False
        if self.slug is None:
            if self.id is None:
                need_update = True
                self.slug = ''
            else:
                self.slug = self.id
        super(News, self).save(*args, **kwds)
        if need_update:
            self.slug = self.id
            super(News, self).save(force_update=True)
    save.alters_data = True

    def get_absolute_url(self):
        return reverse('news_detail', kwargs={
            'year': '%04d' % self.date.year,

            'month': '%02d' % self.date.month,