class ModelAdmin admin ModelAdmin def view_link self obj return href v

1
2
3
4
5
6
class ModelAdmin(admin.ModelAdmin):
def view_link(self, obj):
return u"<a href='view/%d/'>View</a>" % obj.id
view_link.short_description = ''
view_link.allow_tags = True
list_display = ('id', view_link)