Just add a callable to your AnswerAdmin
:
from django.contrib import admin
from surveyApp.models import survey, answer
admin.site.register(survey)
class AnswerAdmin(admin.ModelAdmin):
list_display = ('answer_text', 'survey', 'category', 'ans_date', 'exp_date')
def exp_date(self, obj):
return obj.survey.exp_date
exp_date.short_description = 'Exp Date'
admin.site.register(answer, answerAdmin)
Also, just as general Django advice: models (or any other classes) are usually capitalized. Thus:
class Survey (models.Model):
....