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')
|
||||
|
||||
@property
|
||||
def no_image(self):
|
||||
if not self.visual: return 'X'
|
||||
return ''
|
||||
def with_image(self):
|
||||
if not self.visual: return u''
|
||||
return u'✔'
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = 'Entries'
|
||||
|
|
|
@ -11,8 +11,8 @@ class EntryModelAdmin(ModelAdmin):
|
|||
menu_order = 200
|
||||
add_to_settings_menu = False
|
||||
exclude_from_explorer = True
|
||||
list_display = ('published', 'title', 'no_image', 'lang')
|
||||
list_filter = ('author', 'tags')
|
||||
list_display = ('published', 'title', 'with_image', 'lang')
|
||||
search_fields = ('title', 'author', 'content', 'tags')
|
||||
|
||||
modeladmin_register(EntryModelAdmin)
|
||||
|
|
Loading…
Reference in a new issue