# Path: django/contrib/aderit/news/models.py
# class NewsItem(models.Model):
#     title = models.CharField(max_length=100)
#     slug = models.SlugField(help_text=_('A slug is used as part of the URL '
#                                         'for this article. '
#                                         'It is recommended to use the '
#                                         'default value if possible.'))
#     pub_date = models.DateField(blank=True, null=True,
#                                 help_text=_('YYYY-MM-DD -- Leave blank '
#                                             'if you don\'t want the article '
#                                             'to appear on the site yet.'))
#     snippet = models.TextField(blank=True,
#                                help_text=_('Snippets are used as '
#                                            'a preview for this '
#                                            'article (in sidebars, etc).'))
#     body = models.TextField(blank=True)
# 
#     def __unicode__(self):
#         return self.title
# 
#     class Meta:
#         verbose_name = _("News")
#         verbose_name_plural = _("News")
#         ordering = ['-pub_date']
#         unique_together = (('slug', 'pub_date'), )


from django.conf.urls.defaults import url, patterns
from django.conf import settings
from django.views.generic import ListView, DetailView
from django.contrib.aderit.news.models import NewsItem

PAGINATION = getattr(settings, 'NEWS_PAGINATED_BY', 5)

urlpatterns = patterns(
    '',
    url(r'^$',
        ListView.as_view(model=NewsItem,
                         template_name="news/news_list.html",
                         paginate_by=PAGINATION,
                         context_object_name='news_list'),
        name="news_list"),
    url(r'^detail/(?P<slug>\d+)/$',

# Path: django/contrib/aderit/news/models.py
# class NewsItem(models.Model):
#     title = models.CharField(max_length=100)
#     slug = models.SlugField(help_text=_('A slug is used as part of the URL '
#                                         'for this article. '
#                                         'It is recommended to use the '
#                                         'default value if possible.'))
#     pub_date = models.DateField(blank=True, null=True,
#                                 help_text=_('YYYY-MM-DD -- Leave blank '
#                                             'if you don\'t want the article '
#                                             'to appear on the site yet.'))
#     snippet = models.TextField(blank=True,
#                                help_text=_('Snippets are used as '
#                                            'a preview for this '
#                                            'article (in sidebars, etc).'))
#     body = models.TextField(blank=True)
# 
#     def __unicode__(self):
#         return self.title
# 
#     class Meta:
#         verbose_name = _("News")
#         verbose_name_plural = _("News")
#         ordering = ['-pub_date']
#         unique_together = (('slug', 'pub_date'), )


# Path: django/contrib/aderit/news/urls.py
from django.conf.urls.defaults import url, patterns
from django.conf import settings
from django.views.generic import ListView, DetailView
from django.contrib.aderit.news.models import NewsItem


PAGINATION = getattr(settings, 'NEWS_PAGINATED_BY', 5)

urlpatterns = patterns(
    '',
    url(r'^$',
        ListView.as_view(model=NewsItem,
                         template_name="news/news_list.html",
                         paginate_by=PAGINATION,
                         context_object_name='news_list'),
        name="news_list"),
    url(r'^detail/(?P<slug>\d+)/$',

        DetailView.as_view(model=NewsItem,