Commits

Luke Plant committed eb366d8 Merge

Merged from default

Comments (0)

Files changed (4)

cciw/middleware/http.py

 
 class ActAsProxy(object):
     """
-    Allows us to use privoxy and a redirect from www.cciw.co.uk
-    for the sake of demos
+    When running a demo, and wanting to show the correct domain name, simply
+    add this middleware and set 127.0.0.1:8000 as the proxy in the web
+    browser.  If you need the browser to make requests to other domains, use
+    privoxy and a redirect.
     """
     URLS = ["http://www.cciw.co.uk"]
     def process_request(self, request):
 
 if LIVEBOX and PRODUCTION:
     SESSION_COOKIE_SECURE = True
+    CSRF_COOKIE_SECURE = True
 
 ######  TEMPLATES  ###########
 

templates/admin/base_site.html

    $(document).ready(cciw.externalLinks);
 })(jQuery);
 </script>
+<script type="text/javascript">
 
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-23715914-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
 {% endblock %}
 {% block branding %}
 <div id="header2">

templates/cciw/base.html

 <link href="https://fonts.googleapis.com/css?family=Amaranth" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" type="text/css" />
 {% block extraheader %}{% endblock %}
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-23715914-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
 </head>
 <body>
 {% block bodystart %}