{% load i18n %}
<form action="{{ action|escape }}" id="{{ search_form_id|escape }}" class="form-search">
  <div>
    <input type="hidden" name="cx" value="{{ cx }}">
    <input type="hidden" name="cof" value="FORID:11"> 
    <input type="hidden" name="ie" value="UTF-8">
    <input type="hidden" name="hl" value="{{ lang|escape }}">
    <input id="id_search_page_q" class="{{span_size}} search-query" type="text" name="q" data-provide="oksearch" autocomplete="off" value="{{ form.q.value|default:"" }}">
    <button type="submit"><i class="icon icon-search"></i></button>
    {{ form.as_q }}
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form={{ search_form_id|escape }}&amp;lang={{ lang|escape }}"></script>

{% load i18n %}
<form action="{{ action|escape }}" id="{{ search_form_id|escape }}" class="form-search">
  <div>
    <input type="hidden" name="cx" value="{{ cx }}">
    <input type="hidden" name="cof" value="FORID:11"> 
    <input type="hidden" name="ie" value="UTF-8">
    <input type="hidden" name="hl" value="{{ lang|escape }}">
    <input id="id_search_page_q" class="{{span_size}} search-query" type="text" name="q" data-provide="oksearch" autocomplete="off" value="{{ form.q.value|default:"" }}">
    <button type="submit"><i class="icon icon-search"></i></button>
    {{ form.as_q }}
  </div>
</form>
<script type="text/javascript" src="//www.google.com/coop/cse/brand?form={{ search_form_id|escape }}&amp;lang={{ lang|escape }}"></script>

Switch google cse to https
Switch google cse to https
