Skip to content

115页 6.1.2 报错呢。。 #54

@weisong5908

Description

@weisong5908

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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions