{% extends "site_base.html" %}
{% load i18n %}

{% block extra_head %}
{{ block.super }}
{% endblock %}

{% block body %}
<div class="t">
    <h1>Tendenci Update</h1>
    <img src="{{ STATIC_URL }}images/loadingicon.gif"/>
    <p>Updating Tendenci. Please wait...</p>
</div>
{% endblock %}

{% block extra_body %}
{{ block.super }}
<script type="text/javascript">
  $(document).ready(function() {    
    var status_check = function(){
        $.ajax({
           url: "{% url update_tendenci.check %}",
           success: function(status_data){
               if (status_data == 'False') {
                  location.reload()
               }
           }
         });
    }
    status_check_intval = setInterval(function() {
        status_check();  // check every 30 seconds
    }, 30000);
  });
</script>
{% endblock %}
