Created
January 21, 2016 11:09
-
-
Save kezabelle/de5e7c17e54d16a48edd to your computer and use it in GitHub Desktop.
for rramirez on #django IRC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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