diff --git a/edivorce/apps/core/context_processors.py b/edivorce/apps/core/context_processors.py new file mode 100644 index 00000000..ddfb2a37 --- /dev/null +++ b/edivorce/apps/core/context_processors.py @@ -0,0 +1,8 @@ +from django.conf import settings + + +def settings_processor(request): + return { + 'gtm_id': settings.GTM_ID, + 'proxy_root_path': settings.FORCE_SCRIPT_NAME + } diff --git a/edivorce/apps/core/middleware/bceid_middleware.py b/edivorce/apps/core/middleware/bceid_middleware.py index 661b942b..c8f8cf93 100644 --- a/edivorce/apps/core/middleware/bceid_middleware.py +++ b/edivorce/apps/core/middleware/bceid_middleware.py @@ -18,9 +18,6 @@ class BceidUser(object): class BceidMiddleware(object): def process_request(self, request): - # make the FORCE_SCRIPT_NAME available in templates - request.proxy_root_path = settings.FORCE_SCRIPT_NAME - localdev = settings.DEPLOYMENT_TYPE == 'localdev' # make sure the request didn't bypass the proxy diff --git a/edivorce/apps/core/templates/base.html b/edivorce/apps/core/templates/base.html index 2cf97f25..269516f4 100644 --- a/edivorce/apps/core/templates/base.html +++ b/edivorce/apps/core/templates/base.html @@ -16,17 +16,19 @@ {% compress css %} {% endcompress %} + {% include 'partials/gtm_head.html' %} + {% include 'partials/gtm_body.html' %}
diff --git a/edivorce/apps/core/templates/partials/gtm_body.html b/edivorce/apps/core/templates/partials/gtm_body.html new file mode 100644 index 00000000..3fbdc676 --- /dev/null +++ b/edivorce/apps/core/templates/partials/gtm_body.html @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/edivorce/apps/core/templates/partials/gtm_head.html b/edivorce/apps/core/templates/partials/gtm_head.html new file mode 100644 index 00000000..49ea732d --- /dev/null +++ b/edivorce/apps/core/templates/partials/gtm_head.html @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/edivorce/apps/core/templates/pdf/form1.html b/edivorce/apps/core/templates/pdf/form1.html index 73e9a563..7164323c 100644 --- a/edivorce/apps/core/templates/pdf/form1.html +++ b/edivorce/apps/core/templates/pdf/form1.html @@ -16,10 +16,11 @@ + + {% include 'partials/gtm_head.html' %} -