Fixed a problem with Django settings being loaded