Model fields not being displayed in django admin

actually i am beginner learning django and i wanted to create my own project. so i started with making models and fields of all required apps then i also registered in admin.py but still the fields are not being shown in the django admin panel.

So this is models.py of one of my django app

from django.db import models
from authentication.models import User
from course_management.models import Course
# Create your models here.
class Attendance(models.Model):
    user=models.ForeignKey(User,on_delete=models.CASCADE)
    course=models.ForeignKey(Course,on_delete=models.CASCADE)
    date=models.DateField()
    status=models.CharField(max_length=250)

and i have registered it in admin.py as well, but still the fields are not shown in django admin. this is happening w all the other django apps as well

from django.contrib import admin
from .models import Attendance
# Register your models here.
class AttendanceAdmin(admin.ModelAdmin):
    list_display=('user','course','date','status')
admin.site.register(Attendance,AttendanceAdmin)```
python manage.py makemigrations
python manage.py migrate
Back to Top