Run code during init


#1

Hi guys!

Which is the best place to run code during the initialization? Now I have been running code in wsgi.py for this purpose but maybe you have a better option. Thanks!


(Vitor Freitas) #2

A good place to run a code during the initialization process is inside the AppConfig.ready

The ready method is executed when the app is fully loaded. A normal use case of the ready method is to load signals for example.