From e9e79428d3789622b31522ef0810147c6aa645be Mon Sep 17 00:00:00 2001 From: Keyvan Mosharraf Date: Fri, 31 May 2019 03:45:59 -0700 Subject: [PATCH] Better way to include django_celery_beat in INSTALLED_APPS --- {{cookiecutter.project_slug}}/config/settings/base.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 94fd384f..2745058d 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -75,11 +75,10 @@ THIRD_PARTY_APPS = [ "allauth.account", "allauth.socialaccount", "rest_framework", -] -# http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#using-custom-scheduler-classes -{% if cookiecutter.use_celery == 'y' -%} -THIRD_PARTY_APPS += ["django_celery_beat"] +{%- if cookiecutter.use_celery == 'y' %} + "django_celery_beat", {%- endif %} +] LOCAL_APPS = [ "{{ cookiecutter.project_slug }}.users.apps.UsersConfig",