internal_template_style
This commit is contained in:
@@ -45,7 +45,7 @@ class MyProductsService(BaseService):
|
|||||||
member_data = Members.get_member_by_uid(uid)
|
member_data = Members.get_member_by_uid(uid)
|
||||||
member_id = member_data.id
|
member_id = member_data.id
|
||||||
|
|
||||||
# is this a valid olor scheme
|
# is this a valid color scheme
|
||||||
colorStyle= ProductsColorStyle.get_colorstyle_by_product_id_and_uid(product_id, color_style_uid)
|
colorStyle= ProductsColorStyle.get_colorstyle_by_product_id_and_uid(product_id, color_style_uid)
|
||||||
if colorStyle and colorStyle.color_style != '':
|
if colorStyle and colorStyle.color_style != '':
|
||||||
MembersProducts.set_member_product_colorstyle(member_id, product_id, color_style_uid)
|
MembersProducts.set_member_product_colorstyle(member_id, product_id, color_style_uid)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from app.utils.logger import logger
|
|||||||
from app.api.services.base_service import BaseService
|
from app.api.services.base_service import BaseService
|
||||||
from sqlalchemy import func, desc
|
from sqlalchemy import func, desc
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.models import MembersProductsSettings, MembersProducts
|
from app.models import MembersProductsSettings, MembersProducts, ProductsColorStyle
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
class WebContentsService(BaseService):
|
class WebContentsService(BaseService):
|
||||||
@@ -37,7 +37,34 @@ class WebContentsService(BaseService):
|
|||||||
"about_extra_2": "About - Extra 2 -Mauris donec ociis magnis sapien ipsum sagittis sapien tempor and volute gravida aliquet quaerat vitae ",
|
"about_extra_2": "About - Extra 2 -Mauris donec ociis magnis sapien ipsum sagittis sapien tempor and volute gravida aliquet quaerat vitae ",
|
||||||
"contact_title": "Questions? Let's Talk",
|
"contact_title": "Questions? Let's Talk",
|
||||||
"contact_introduction": "Want to learn more about us, or speak with an expert? Let us know what you are looking for and we’ll get back to you right away",
|
"contact_introduction": "Want to learn more about us, or speak with an expert? Let us know what you are looking for and we’ll get back to you right away",
|
||||||
|
"internal_template_style": ''
|
||||||
}
|
}
|
||||||
|
# web_contents_data[""] = ""
|
||||||
|
# Do we have this subsction
|
||||||
|
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
||||||
|
if membersSubResult:
|
||||||
|
member_sub = {
|
||||||
|
'id': membersSubResult.id,
|
||||||
|
'subscription_uid': str(membersSubResult.uid),
|
||||||
|
'member_id': membersSubResult.member_id,
|
||||||
|
'product_id': membersSubResult.product_id,
|
||||||
|
'internal_url': membersSubResult.internal_url,
|
||||||
|
'external_url': membersSubResult.external_url,
|
||||||
|
'dns_group': membersSubResult.dns_group,
|
||||||
|
'product_template': membersSubResult.product_template,
|
||||||
|
'primary_server': membersSubResult.primary_server,
|
||||||
|
'provision_port': membersSubResult.provision_port,
|
||||||
|
'custom_template': membersSubResult.custom_template,
|
||||||
|
'status': membersSubResult.status,
|
||||||
|
'updated': membersSubResult.updated,
|
||||||
|
"added": membersSubResult.added,
|
||||||
|
}
|
||||||
|
|
||||||
|
if membersSubResult.colorstyle !='':
|
||||||
|
# is this a valid olor scheme
|
||||||
|
colorStyle = ProductsColorStyle.get_colorstyle_by_product_id_and_uid(membersSubResult.product_id, membersSubResult.colorstyle)
|
||||||
|
if colorStyle and colorStyle.color_style != '':
|
||||||
|
web_contents_data["internal_template_style"] = colorStyle.color_style
|
||||||
|
|
||||||
# web_contents_data ={}
|
# web_contents_data ={}
|
||||||
settings_data_result = MembersProductsSettings.get_product_settings_by_subscription_uid(provision_uid)
|
settings_data_result = MembersProductsSettings.get_product_settings_by_subscription_uid(provision_uid)
|
||||||
@@ -48,6 +75,9 @@ class WebContentsService(BaseService):
|
|||||||
else:
|
else:
|
||||||
web_contents_data[t.settings_key.strip()] = t.setting_value.strip()
|
web_contents_data[t.settings_key.strip()] = t.setting_value.strip()
|
||||||
|
|
||||||
|
# The template set up
|
||||||
|
|
||||||
|
|
||||||
return web_contents_data
|
return web_contents_data
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user