[Answer]-How to use foreignKey?

1👍

✅

You outs gender.id, not gender name.

Try to replace this

<td class="gender info">{{ entries_user_profile.gender_id }}</td>

with this

<td class="gender info">{{ entries_user_profile.gender.gender }}</td>

UPDATE

Maybe choices is a better way to store users gender. Check it out: https://docs.djangoproject.com/en/dev/ref/models/fields/#choices

Leave a comment