1👍
✅
From the docs:
…you can register the model class without providing a ModelAdmin
description.
So admin.site.register(SignUp)
would be the same as,
class signUpAdmin(admin.ModelAdmin):
pass
admin.site.register(SignUp, signUpAdmin)
1👍
Yes, that’s correct.
The first one is the ‘out-of-the-box’ solution, while the second one is needed when you want to do more fancy stuff (for example editing a model that has a 1 to n relation).
- [Answered ]-Render image in django view with correct aspect ratios
- [Answered ]-Django rest framework and multiple routers
- [Answered ]-Django Finite State Machine and FSMKeyField – saving forms
Source:stackexchange.com