37👍
✅
The first parameter to register
is the model class itself. You have used the same name for your model class as your admin class. Give them separate names and pass them both to register
.
class UserProfileAdmin(admin.ModelAdmin):
change_form_template = 'progressbarupload/change_form.html'
add_form_template = 'progressbarupload/change_form.html'
admin.site.register(UserProfile, UserProfileAdmin)
Source:stackexchange.com