MrOxiMoron / cmsplugin-news

A news application which is pluggable into django-cms. Just so you know, I've been kinda busy with other programming tasks which didn't involve django cms. This I don't know if this still work with the latest version or not.

commit 7: 4d3beca51d96
parent 6: 12638d130b29
branch: default
Add excerpt to the news model.
Bernd Zeimetz / bzed
4 months ago

Changed (Δ78 bytes):

raw changeset »

cmsplugin_news/admin.py (1 lines added, 1 lines removed)

cmsplugin_news/models.py (1 lines added, 0 lines removed)

Up to file-list cmsplugin_news/admin.py:

@@ -16,7 +16,7 @@ class NewsAdmin(admin.ModelAdmin):
16
16
    list_display = ('slug', 'title', 'is_published', 'pub_date')
17
17
    #list_editable = ('title', 'is_published')
18
18
    list_filter = ('is_published', )
19
    search_fields = ['title', 'content']
19
    search_fields = ['title', 'excerpt', 'content']
20
20
    prepopulated_fields = {'slug': ('title',)}
21
21
    form = NewsForm
22
22
    

Up to file-list cmsplugin_news/models.py:

@@ -22,6 +22,7 @@ class News(models.Model):
22
22
    title           = models.CharField(_('Title'), max_length=255)
23
23
    slug            = models.SlugField(_('Slug'), unique_for_date='pub_date', 
24
24
                        help_text=_('A slug is a short name which uniquely identifies the news item for this day'))
25
    excerpt         = models.TextField(_('Excerpt'), blank=True)
25
26
    content         = models.TextField(_('Content'), blank=True)
26
27
    
27
28
    is_published    = models.BooleanField(_('Published'), default=False)