You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from django.contrib import admin
from .models import Comment
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
list_display = ('traget','nickname','content','website','created_time')
按书上教程敲的代码。
到这里就报错了。。。
ERRORS:
<class 'comment.admin.CommentAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'traget', which is not a callable, an attribute of 'CommentAdmin', or an attribute or method on 'comment.Comment'.
The text was updated successfully, but these errors were encountered:
from django.contrib import admin
from .models import Comment
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
list_display = ('traget','nickname','content','website','created_time')
按书上教程敲的代码。
到这里就报错了。。。
ERRORS:
<class 'comment.admin.CommentAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'traget', which is not a callable, an attribute of 'CommentAdmin', or an attribute or method on 'comment.Comment'.
The text was updated successfully, but these errors were encountered: