Comment 1 for bug 1535688

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote : Re: ipdevpoll multiprocess mode broken in NAV 4.0.0

The nav.models module performs a very naive verification of the DJANGO_SETTINGS_MODULE environment variable, only running "django.setup()" if it was unset at module load time.

ipdevpoll, and other binaries in NAV, defer to this module to ensure all the Django models are properly loaded under Django 1.7, and do not perform this check themselves.

The problem here is that the environment variable is already set as the ipdevpoll child processes start (and it could be for any NAV program in a production setup), cause the django.setup() to never be run. This results in the django.core.exceptions.AppRegistryNotReady exception.