Correct place to put extra startup code in django?

If you don't want to use settings module, then try project's __init__.py.


If you want to check that the system is correctly installed, I think that you should write your own admin command and run it as post-installation check.

I think that it doesn't worth to check if the python version is correctly installed too often especially if you are installing the django app on shared-host. My app is hosted at alwaysdata and they restart the FastCgi process every hour. These checks can have an impact on the application response time.


We use the top-level urls.py for this.

Tags:

Python

Django