added celery and tasks but most important added tag_list

This commit is contained in:
Esther Kleinhenz
2018-10-22 18:58:10 +02:00
parent 3c7005afaf
commit f5980566ae
635 changed files with 117534 additions and 1732 deletions
+14 -2
View File
@@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
import os
import re
import socket
import djcelery
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -46,6 +47,8 @@ INSTALLED_APPS = [
'application',
'taggit',
'taggit_templatetags2',
'djcelery',
'kombu.transport.django',
]
MIDDLEWARE = [
@@ -171,7 +174,7 @@ else:
]
print(" --- Live stage --- ")
AUTH_PROFILE_MODULE = 'application.CustomUser'
#Log Configuration
LOGGING = {
@@ -249,4 +252,13 @@ if DEBUG:
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}
}
# Celery settings
BROKER_URL = 'django://'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
djcelery.setup_loader()