Skip to content

Commit 2debf44

Browse files
committed
Enhance the admin list page for Stream a bit.
- Legacy-Id: 3263
1 parent 804e7cb commit 2debf44

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

ietf/ietfworkflows/admin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class AnnotationTagInline(admin.TabularInline):
1111

1212
class IETFWorkflowAdmin(admin.ModelAdmin):
1313
inlines = [StateInline, AnnotationTagInline]
14+
admin.site.register(WGWorkflow, IETFWorkflowAdmin)
1415

1516
class StreamedIdAdmin(admin.ModelAdmin):
1617
list_display = [ 'id', 'draft', 'stream', 'content_type', 'content_id', 'group', ]
@@ -19,5 +20,6 @@ class StreamedIdAdmin(admin.ModelAdmin):
1920
pass
2021
admin.site.register(StreamedID, StreamedIdAdmin)
2122

22-
admin.site.register(WGWorkflow, IETFWorkflowAdmin)
23-
admin.site.register(Stream, admin.ModelAdmin)
23+
class StreamAdmin(admin.ModelAdmin):
24+
list_display = ['name', 'with_groups', 'group_model', 'group_chair_model', 'workflow_link', ]
25+
admin.site.register(Stream, StreamAdmin)

ietf/ietfworkflows/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.utils.translation import ugettext_lazy as _
55

66
from ietf.idtracker.models import PersonOrOrgInfo, InternetDraft
7+
from ietf.utils.admin import admin_link
78
from workflows.models import Workflow, State, StateObjectRelation
89
from permissions.models import Permission
910

@@ -146,6 +147,7 @@ class Stream(models.Model):
146147

147148
def __unicode__(self):
148149
return u'%s stream' % self.name
150+
workflow_link = admin_link('workflow')
149151

150152

151153
class StreamedID(models.Model):

0 commit comments

Comments
 (0)