Attributeerror: Type Object 'product' Has No Attribute '_meta'
I am pretty new in Python / Django so please bear .. I am unable to run any commands and the terminal produces the same error every time. My Model looks like this: from django.db i
Solution 1:
It seems from the traceback that the problem is coming from your admin.py
. If you are using the admin.register
decorator make sure you are using it right:
@admin.register(Product)classProductAdmin(admin.ModelAdmin):
pass
Or, you can use the admin.site.register
function:
classProductAdmin(admin.ModelAdmin):
pass
admin.site.register(Product, ProductAdmin)
Post a Comment for "Attributeerror: Type Object 'product' Has No Attribute '_meta'"