Slight revision of Entries admin
This commit is contained in:
parent
35dda4103b
commit
c9aa1c0708
2 changed files with 4 additions and 4 deletions
|
@ -44,9 +44,9 @@ class Entry(models.Model):
|
||||||
verbose_name='Original stream')
|
verbose_name='Original stream')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def no_image(self):
|
def with_image(self):
|
||||||
if not self.visual: return 'X'
|
if not self.visual: return u''
|
||||||
return ''
|
return u'✔'
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural = 'Entries'
|
verbose_name_plural = 'Entries'
|
||||||
|
|
|
@ -11,8 +11,8 @@ class EntryModelAdmin(ModelAdmin):
|
||||||
menu_order = 200
|
menu_order = 200
|
||||||
add_to_settings_menu = False
|
add_to_settings_menu = False
|
||||||
exclude_from_explorer = True
|
exclude_from_explorer = True
|
||||||
list_display = ('published', 'title', 'no_image', 'lang')
|
|
||||||
list_filter = ('author', 'tags')
|
list_filter = ('author', 'tags')
|
||||||
|
list_display = ('published', 'title', 'with_image', 'lang')
|
||||||
search_fields = ('title', 'author', 'content', 'tags')
|
search_fields = ('title', 'author', 'content', 'tags')
|
||||||
|
|
||||||
modeladmin_register(EntryModelAdmin)
|
modeladmin_register(EntryModelAdmin)
|
||||||
|
|
Loading…
Reference in a new issue