Fixed an regression when configuring Django from pytest_configure or
from a custom script file.