[Fixed]-How to solve the error with migration django?

1👍

You’re not registering the PostLecture model with anything (as you do with Blog).

Please change to:

class PostLectureAdmin(admin.ModelAdmin):
    list_display = ('title', )

admin.site.register(PostLecture, PostLectureAdmin)

Also, as a sidenote, inside the PostLecture model, remove either __unicode__ or __str__. Use __unicode__ if you’re using python 2 or use __str__ if you’re using python 3.

👤nik_m

Leave a comment