Run django.setup() when Camera is being installed.

This commit is contained in:
Jannis Leidel 2017-05-08 15:54:15 +02:00
parent a9c514fabd
commit 87be921761

View file

@ -49,6 +49,14 @@ class Camera(Polaroid):
'monitors_expire_pending': timedelta(days=5),
})
def django_setup(self):
import django
django.setup()
def install(self):
super(Camera, self).install()
self.django_setup()
@property
def expire_task_states(self):
"""Return a twople of Celery task states and expiration timedeltas."""