<filename>xp/celery.py
from __future__ import absolute_import, unicode_literals

import os

from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'xp.settings')

app = Celery('xp', namespace='CELERY')
app.config_from_object('django.conf:settings')
app.autodiscover_tasks()

<filename>xp/celery.py
from __future__ import absolute_import, unicode_literals

import os

from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'xp.settings')

app = Celery('xp', namespace='CELERY')
app.config_from_object('django.conf:settings')
app.autodiscover_tasks()
