How to fix Django's "model ‘MyModel’ is already registered" error?
To fix this, you need to place the admin.site.register line in a separate file called admin.py. This file should exists at the same level as models.py. This will ensure that admin class for a model is registered only once.
Комментариев нет:
Отправить комментарий