2👍
✅
This should be
admin.site.register(UserProfile)
admin.site.register(Post)
Admin.site.register
takes two parameters, the first is the model class and the optional second parameter is an admin class. In your code, you were passing another model as the admin class.
for more information, please refer to :https://docs.djangoproject.com/en/1.10/ref/contrib/admin/
👤e4c5
Source:stackexchange.com