expe.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {% extends 'base.html' %}
  2. {% load staticfiles %}
  3. {% block title %}
  4. Expe {{ expe_name }}
  5. {% endblock %}
  6. {% block content %}
  7. {% if request.session.expe_finished %}
  8. <h3>{{end_text}}</h3>
  9. <br />
  10. <p>You will be redirected in <span id="refreshTime">5</span> sec to home page</p>
  11. {% endif %}
  12. <!-- TODO : Load img from bitmap with javascript `loadImg.js` -->
  13. {% if not request.session.expe_finished %}
  14. <img id="expeImg" src="/{{img_merged_path}}" data-img="{{request.session.img_merged}}"/>
  15. {% endif %}
  16. {% block javascripts %}
  17. <script type="text/javascript">
  18. // Utils informations
  19. var host = window.location.host
  20. var pathname = window.location.pathname
  21. var baseUrl = location.protocol + "//" + host
  22. var baseExpeUrl = location.protocol + "//" + host + pathname
  23. // get access to django variables
  24. var BEGIN_EXPE = "{{request.session.expe_started}}"
  25. var END_EXPE = "{{request.session.expe_finished}}"
  26. </script>
  27. <script src="{% static "js/loadImg.js" %}"></script>
  28. <script src="{% static "js/keyEvents.js" %}"></script>
  29. {% endblock %}
  30. {% endblock %}