Forums

Couldn't change the display of data in Django Admin

I've defined a Class call 'Post' and register it in the admin.py as below:

from django.contrib import admin from .models import Post

Register your models here.

class PostAdmin(admin.ModelAdmin): fields=('title', 'slug')

admin.site.register(Post,PostAdmin)

But it change nothing in the Django admin console, all the records shows as before.

Did I miss anything? Thanks.

Have you reloaded your site from the "Web" tab after making the code change?