[Solved]-What does admin.autodiscover actually do?


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.


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.


Leave a comment