Compare commits
7 commits
9a355ff2a0
...
e814c9f981
Author | SHA1 | Date | |
---|---|---|---|
Hugh Rundle | e814c9f981 | ||
Hugh Rundle | da58002f2f | ||
Hugh Rundle | 60451f565a | ||
Hugh Rundle | 2e0bcb1c01 | ||
Hugh Rundle | 16561eba6f | ||
Hugh Rundle | c8fc3b4c45 | ||
Hugh Rundle | e8bebca7b4 |
|
@ -131,6 +131,7 @@ class Blog(admin.ModelAdmin):
|
|||
"active",
|
||||
)
|
||||
ordering = ["approved", "-suspended", "-failing"]
|
||||
search_fields = ["title", "author_name", "url"]
|
||||
actions = [approve, unapprove, suspend, unsuspend, activate, disable]
|
||||
|
||||
|
||||
|
@ -140,6 +141,7 @@ class Article(admin.ModelAdmin):
|
|||
|
||||
date_hierarchy = "pubdate"
|
||||
list_display = ("title", "blog_title", "pubdate")
|
||||
search_fields = ["title", "author_name", "blog_title", "url"]
|
||||
|
||||
def blog_title(self, obj): # pylint: disable=no-self-use
|
||||
"""get the title of the parent blog"""
|
||||
|
@ -151,7 +153,7 @@ class Tag(admin.ModelAdmin):
|
|||
"""display settings for tags"""
|
||||
|
||||
list_display = ("name",)
|
||||
|
||||
search_fields = ["name"]
|
||||
|
||||
@admin.register(models.Event)
|
||||
class Event(admin.ModelAdmin):
|
||||
|
@ -166,6 +168,7 @@ class Event(admin.ModelAdmin):
|
|||
"start_date",
|
||||
)
|
||||
ordering = ["approved", "announcements"]
|
||||
search_fields = ["name", "description", "url"]
|
||||
actions = [approve, unapprove]
|
||||
|
||||
|
||||
|
@ -176,6 +179,7 @@ class CallForPapers(admin.ModelAdmin):
|
|||
list_display = ("name", "event", "approved", "closing_date")
|
||||
list_select_related = ("event",)
|
||||
ordering = ["approved", "closing_date"]
|
||||
search_fields = ["event__name", "event__url", "details"]
|
||||
actions = [approve, unapprove]
|
||||
|
||||
|
||||
|
@ -185,6 +189,7 @@ class Group(admin.ModelAdmin):
|
|||
|
||||
list_display = ("name", "approved", "category", "description")
|
||||
ordering = ["approved", "name"]
|
||||
search_fields = ["name", "description", "url"]
|
||||
actions = [approve, unapprove]
|
||||
|
||||
|
||||
|
@ -200,6 +205,7 @@ class Newsletter(admin.ModelAdmin):
|
|||
"active",
|
||||
)
|
||||
ordering = ["approved", "-failing"]
|
||||
search_fields = ["name", "description", "url", "author_name"]
|
||||
actions = [approve, unapprove, suspend, activate, disable]
|
||||
|
||||
|
||||
|
@ -209,6 +215,7 @@ class Edition(admin.ModelAdmin):
|
|||
|
||||
date_hierarchy = "pubdate"
|
||||
list_display = ("title", "newsletter_name", "pubdate")
|
||||
search_fields = ["title", "description", "url", "newsletter__name", "author_name"]
|
||||
|
||||
def newsletter_name(self, obj): # pylint: disable=no-self-use
|
||||
"""get the title of the parent newsletter"""
|
||||
|
|
Loading…
Reference in a new issue