I do have a model Comment
that relates to the model Poller
via FK relationship.
Is there any way I can jump to this related object via the Django admin interface from the Comment's overview?
# Models.py
class Comment(models.Model):
"""
A Class for comments made by users to a specific Poller
"""
poller = models.ForeignKey(Poller, on_delete=models.CASCADE, related_name='PollerComment')
user = models.ForeignKey(Account, on_delete=models.CASCADE)
vote = models.ForeignKey(Vote, on_delete=models.CASCADE)
# Admin.py
@admin.register(Comment)
class PollerCommentAdmin(admin.ModelAdmin):
list_display = ('user', 'created_on', 'poller', 'comment', 'flag_count', 'upvote_count',
'downvote_count', 'is_public', 'is_removed')
Now I would like to make the 'poller' column clickable which will then redirect me to this poller object in the admin.