celery/django-celery — pull request #333 by rockallite (2014-07-16 16:33:13+00:00)
Title: Fix AppRegistryNotReady exception when Celery beat uses DatabaseSchedule...

...r with Django 1.7.

The application registry feature is introduced in Django 1.7. The `DatabaseScheduler` try to access Django application models before the application registry is populated. As a result, `AppRegistryNotReady` exception is raised when we run `celery -A proj beat -S djcelery.schedulers.DatabaseScheduler`.

This PR try to fix this problem by running `django.setup()` in `DatabaseScheduler.setup_schedule()`.

https://docs.djangoproject.com/en/dev/releases/1.7/#standalone-scripts