Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8195641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:12:24+00:00 2026-06-07T05:12:24+00:00

Various other posts on stack have looked at how to properly include a foreignkey

  • 0

Various other posts on stack have looked at how to “properly” include a foreignkey in list_display, which enables sorting, etc.

However, I am not interested in that. I just want to display the unicode of the foreignkey field.

From the django docs:

A few special cases to note about list_display:

If the field is a ForeignKey, Django will display the __unicode__() of the related object.

I had this working previously, but since I last checked the django admin, it is no longer displaying any entries at all if the list_display includes a foreignkey field. Once the foreignkey field is removed from list_display, the entries are once again displaying.

I obviously updated something minor that caused this. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:12:26+00:00Added an answer on June 7, 2026 at 5:12 am

    Found out that this may be due to a DB issue storing the foreignkey info as an empty string.

    As I am still in development, I simply dropped the table. However, I welcome discussion and answers on how to fix this without dropping the table.

    Django admin List Display + ForeignKey = Empty Change List

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've seen various other posts about this, but unfortunately I still haven't been able
I have been browsing SO and various other sites to find out whether this
I have two tables. One has some product details, the other holds various photos
I've tried the various suggestions from other posts and still can't seem to get
I've looked through the other related posts to my question already over the past
I have been googling and reading various posts around the net and I've tried:
My application has news, posts, comments and various other common things. I'd like to
I've been reading various posts on Stack Overflow to try and find an ideal
I have been researching this problem and while there's lots of posts on various
Using, amongst other sources, various posts here on Stackoverflow, I'm trying to implement my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.