(add, done): add email smtp service and auth service done!
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from .celery import app as celery_app
|
||||
|
||||
__all__ = ['celery_app']
|
||||
10
config/celery.py
Normal file
10
config/celery.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
from celery import Celery
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.base')
|
||||
|
||||
app = Celery('config', broker="redis://redis:6379", backend="redis://redis:6379")
|
||||
|
||||
|
||||
app.config_from_object('django.conf:settings', namespace='CELERY')
|
||||
app.autodiscover_tasks()
|
||||
@@ -1,4 +1,5 @@
|
||||
from .rest_framework import *
|
||||
from .jwt import *
|
||||
from .jazzmin import *
|
||||
from .cache import *
|
||||
from .cache import *
|
||||
from .celery import *
|
||||
8
config/conf/celery.py
Normal file
8
config/conf/celery.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django.conf import settings
|
||||
|
||||
CELERY_BROKER_URL = 'redis://redis:6379'
|
||||
CELERY_RESULT_BACKEND = "redis://redis:6379"
|
||||
CELERY_ACCEPT_CONTENT = ['json']
|
||||
CELERY_TASK_SERIALIZER = 'json'
|
||||
CELERY_TIMEZONE = settings.TIME_ZONE
|
||||
CELERY_ENABLED = True
|
||||
@@ -110,4 +110,11 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
AUTH_USER_MODEL = 'accounts.User'
|
||||
|
||||
EMAIL_HOST_USER = env.str('EMAIL_HOST_USER')
|
||||
EMAIL_HOST_PASSWORD = env.str('EMAIL_HOST_PASSWORD')
|
||||
EMAIL_BACKEND = env.str('EMAIL_BACKEND')
|
||||
EMAIL_HOST = env.str('EMAIL_HOST')
|
||||
EMAIL_PORT = env.str('EMAIL_PORT')
|
||||
EMAIL_USE_TLS = env.str('EMAIL_USE_TLS')
|
||||
|
||||
from config.conf import *
|
||||
Reference in New Issue
Block a user