diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 2d3894e2..8db1cfe2 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -70,6 +70,7 @@ Listed in alphabetical order. Cristian Vargas `@cdvv7788`_ Cullen Rhodes `@c-rhodes`_ Dan Shultz `@shultz`_ + Daniel Hepper `@dhepper`_ @danielhepper Daniele Tricoli `@eriol`_ David Díaz `@ddiazpinto`_ @DavidDiazPinto Davur Clementsen `@dsclementsen`_ @davur @@ -158,6 +159,7 @@ Listed in alphabetical order. .. _@Collederas: https://github.com/Collederas .. _@ddiazpinto: https://github.com/ddiazpinto .. _@dezoito: https://github.com/dezoito +.. _@dhepper: https://github.com/dhepper .. _@dot2dotseurat: https://github.com/dot2dotseurat .. _@dsclementsen: https://github.com/dsclementsen .. _@epileptic-fish: https://gihub.com/epileptic-fish diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py index 7905e366..8346f837 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py @@ -2,7 +2,7 @@ from __future__ import absolute_import import os from celery import Celery -from django.apps import AppConfig +from django.apps import apps, AppConfig from django.conf import settings @@ -22,7 +22,8 @@ class CeleryConfig(AppConfig): # Using a string here means the worker will not have to # pickle the object when using Windows. app.config_from_object('django.conf:settings') - app.autodiscover_tasks(lambda: settings.INSTALLED_APPS, force=True) + installed_apps = [app_config.name for app_config in apps.get_app_configs()] + app.autodiscover_tasks(lambda: installed_apps, force=True) {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%} if hasattr(settings, 'RAVEN_CONFIG'):