Why does it underline the code as an error, but the code itself works, the server starts up and there are no errors, but in problems 31, what is wrong in the code?
from django.contrib import admin
from web_lib.models import Author, Book, ExtUser, Store, Product
@admin.register(Author)
class AuthorAdmin(admin.ModelAdmin):
list_display = ['name', 'age', 'email']
@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
list_display = ['title', 'description', 'page_num']
@admin.register(ExtUser)
class ExtUserAdmin(admin.ModelAdmin):
list_display = ['desc', 'is_loggen']
@admin.register(Store)
class StoreAdmin(admin.ModelAdmin):
list_display = ['name']
@admin.register(Product)
class ProductAdmin(admin.ModelAdmin):
list_display = ['name']
What I have tried:
One-to-many does not work for me in the database, that is, I cannot select several products, I can only select one, why I don’t know.