Skip to content

Instantly share code, notes, and snippets.

@kezabelle
Created January 21, 2016 11:09
Show Gist options
  • Save kezabelle/de5e7c17e54d16a48edd to your computer and use it in GitHub Desktop.
Save kezabelle/de5e7c17e54d16a48edd to your computer and use it in GitHub Desktop.
for rramirez on #django IRC.
class MyModelAdmin(ModelAdmin):
list_display = ['mycallable']
list_display_links = [] # must not include mycallable.
def mycallable(self, obj):
return '<a href="%s">%s</a>' % (reverse('...'), obj)
mycallable.allow_tags = True
mycallable.short_description = "Column title"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment