|
|
|
|
@ -41,7 +41,7 @@ class ConfigSerializer(serializers.ModelSerializer): |
|
|
|
|
|
|
|
|
|
def get_SCHOOL_LOGO_IMAGE(self, config): |
|
|
|
|
request = self.context.get('request') |
|
|
|
|
http_host = request.META.get('HTTP_HOST') |
|
|
|
|
http_host = request.META.get('HTTP_ORIGIN') |
|
|
|
|
if http_host and config.SCHOOL_LOGO_IMAGE: |
|
|
|
|
domain = urlparse(http_host).path.split(':')[0] |
|
|
|
|
SCHOOL_LOGO_IMAGE_url = 'http://' + domain + config.SCHOOL_LOGO_IMAGE.url |
|
|
|
|
@ -51,7 +51,7 @@ class ConfigSerializer(serializers.ModelSerializer): |
|
|
|
|
|
|
|
|
|
def get_MAIN_PAGE_TOP_IMAGE(self, config): |
|
|
|
|
request = self.context.get('request') |
|
|
|
|
http_host = request.META.get('HTTP_HOST') |
|
|
|
|
http_host = request.META.get('HTTP_ORIGIN') |
|
|
|
|
if http_host and config.MAIN_PAGE_TOP_IMAGE: |
|
|
|
|
domain = urlparse(http_host).path.split(':')[0] |
|
|
|
|
MAIN_PAGE_TOP_IMAGE_url = 'http://' + domain + config.MAIN_PAGE_TOP_IMAGE.url |
|
|
|
|
|