5👍
As u said: autodiscover() load all admin.py from the apps folders. So you have in the /admin/ all the models that you use (from your own app or not).
I recommend to use autodiscover() if you are going to use the admin app.
P.D. additionally some app have their on autodiscover with more functionalities.
2👍
admin.py is executed whenever your django loads URLconf from urls.py, the autodiscover() will search for all the apps in INSTALLED_APPS one by one and executes the code in that file.
👤Kota
- Best Practices: How to best implement Rating-Stars in Django Templates
- Django, Celery, Redis, RabbitMQ: Chained Tasks for Fanout-On-Writes
- Django celery 4 – ValueError: invalid literal for int() with base 10 when start celery worker
- DJANGO: How to list_display a reverse foreign key attribute?
Source:stackexchange.com