My app has users who create pages. In the Page
screen of the admin, I'd like to list the User
who created the page, and in that list, I'd like the username to have a link that goes to the user page in admin (not the Page
).
class PageAdmin(admin.ModelAdmin):
list_display = ('name', 'user', )
list_display_links = ('name','user',)
admin.site.register(Page, PageAdmin)
I was hoping that by making it a link in the list_display
it would default to link to the actual user object, but it still goes to Page
.
I'm sure I'm missing something simple here.