Forums

Django column headings don't show

Hello,

I have tried to customize the Django admin to show particular fields for column headings (using list_display). I think the code is supposed to be pretty straightforward, but the column headings just don't show. Do I need to restart the server or something? Here is the code:

from django.contrib import admin from .models import AccuracyDB

admin.site.register(AccuracyDB) class AccuracyDBAdmin(admin.ModelAdmin): list_display = ('username', 'number', 'Accuracy', 'test', 'category')

Hopefully this is a neater view of the code:

from django.contrib import admin<br> from .models import AccuracyDB<br><br>

admin.site.register(AccuracyDB)<br> class AccuracyDBAdmin(admin.ModelAdmin):<br> list_display = ['username', 'number', 'Accuracy', 'test', 'category']

Problem solved.

Glad to hear that!