merged develop

This commit is contained in:
Anatoly 2019-11-11 12:01:16 +03:00
parent c67109d9f8
commit 358407e786
4 changed files with 13 additions and 55 deletions

View File

@ -64,7 +64,7 @@ PROJECT_APPS = [
'news.apps.NewsConfig', 'news.apps.NewsConfig',
'notification.apps.NotificationConfig', 'notification.apps.NotificationConfig',
'partner.apps.PartnerConfig', 'partner.apps.PartnerConfig',
# 'product.apps.ProductConfig', Uncomment after refining task and create migrations 'product.apps.ProductConfig',
'recipe.apps.RecipeConfig', 'recipe.apps.RecipeConfig',
'search_indexes.apps.SearchIndexesConfig', 'search_indexes.apps.SearchIndexesConfig',
'translation.apps.TranslationConfig', 'translation.apps.TranslationConfig',
@ -74,9 +74,7 @@ PROJECT_APPS = [
'comment.apps.CommentConfig', 'comment.apps.CommentConfig',
'favorites.apps.FavoritesConfig', 'favorites.apps.FavoritesConfig',
'rating.apps.RatingConfig', 'rating.apps.RatingConfig',
'transfer.apps.TransferConfig',
'tag.apps.TagConfig', 'tag.apps.TagConfig',
'product.apps.ProductConfig',
] ]
EXTERNAL_APPS = [ EXTERNAL_APPS = [

View File

@ -38,18 +38,9 @@ sentry_sdk.init(
integrations=[DjangoIntegration()] integrations=[DjangoIntegration()]
) )
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = { # DATABASE
'default': { DATABASES.update({
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': os.environ.get('DB_NAME'),
'USER': os.environ.get('DB_USERNAME'),
'PASSWORD': os.environ.get('DB_PASSWORD'),
'HOST': os.environ.get('DB_HOSTNAME'),
'PORT': os.environ.get('DB_PORT'),
},
'legacy': { 'legacy': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'HOST': os.environ.get('MYSQL_HOSTNAME'), 'HOST': os.environ.get('MYSQL_HOSTNAME'),
@ -57,8 +48,12 @@ DATABASES = {
'NAME': os.environ.get('MYSQL_DATABASE'), 'NAME': os.environ.get('MYSQL_DATABASE'),
'USER': os.environ.get('MYSQL_USER'), 'USER': os.environ.get('MYSQL_USER'),
'PASSWORD': os.environ.get('MYSQL_PASSWORD') 'PASSWORD': os.environ.get('MYSQL_PASSWORD')
} }})
}
# INSTALLED APPS
INSTALLED_APPS.append('transfer.apps.TransferConfig')
BROKER_URL = 'redis://localhost:6379/1' BROKER_URL = 'redis://localhost:6379/1'
CELERY_RESULT_BACKEND = BROKER_URL CELERY_RESULT_BACKEND = BROKER_URL

View File

@ -34,16 +34,15 @@ MEDIA_ROOT = os.path.join(PUBLIC_ROOT, MEDIA_LOCATION)
# SORL thumbnails # SORL thumbnails
THUMBNAIL_DEBUG = True THUMBNAIL_DEBUG = True
# ADDED TRANSFER APP # ADDED TRANSFER APP
INSTALLED_APPS.append('transfer.apps.TransferConfig') INSTALLED_APPS.append('transfer.apps.TransferConfig')
# ADDED LEGACY DB CONNECTOR # DATABASES
DATABASES.update({ DATABASES.update({
'legacy': { 'legacy': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
# 'HOST': '172.17.0.1',
# 'HOST': '172.23.0.1',
'HOST': 'mysql_db', 'HOST': 'mysql_db',
'PORT': 3306, 'PORT': 3306,
'NAME': 'dev', 'NAME': 'dev',
@ -89,28 +88,6 @@ LOGGING = {
} }
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': os.environ.get('DB_NAME'),
'USER': os.environ.get('DB_USERNAME'),
'PASSWORD': os.environ.get('DB_PASSWORD'),
'HOST': os.environ.get('DB_HOSTNAME'),
'PORT': os.environ.get('DB_PORT'),
},
'legacy': {
'ENGINE': 'django.db.backends.mysql',
# 'HOST': '172.17.0.1',
# 'HOST': '172.23.0.1',
'HOST': 'mysql_db',
'PORT': 3306,
'NAME': 'dev',
'USER': 'dev',
'PASSWORD': 'octosecret123'
}
}
# ELASTICSEARCH SETTINGS # ELASTICSEARCH SETTINGS
ELASTICSEARCH_DSL = { ELASTICSEARCH_DSL = {
'default': { 'default': {
@ -123,6 +100,7 @@ ELASTICSEARCH_INDEX_NAMES = {
'search_indexes.documents.establishment': 'local_establishment', 'search_indexes.documents.establishment': 'local_establishment',
} }
TESTING = sys.argv[1:2] == ['test'] TESTING = sys.argv[1:2] == ['test']
if TESTING: if TESTING:
ELASTICSEARCH_INDEX_NAMES = {} ELASTICSEARCH_INDEX_NAMES = {}

View File

@ -40,19 +40,6 @@ sentry_sdk.init(
integrations=[DjangoIntegration()] integrations=[DjangoIntegration()]
) )
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': os.environ.get('DB_NAME'),
'USER': os.environ.get('DB_USERNAME'),
'PASSWORD': os.environ.get('DB_PASSWORD'),
'HOST': os.environ.get('DB_HOSTNAME'),
'PORT': os.environ.get('DB_PORT'),
},
}
BROKER_URL = 'redis://redis:6379/1' BROKER_URL = 'redis://redis:6379/1'
CELERY_RESULT_BACKEND = BROKER_URL CELERY_RESULT_BACKEND = BROKER_URL