Browse Source

removed debug element in stats, script improvement

pull/10/head
crunch 6 months ago
parent
commit
1bbdc9b928
2 changed files with 2 additions and 8 deletions
  1. +0
    -7
      Consulta_project/polls/templates/polls/stats.html
  2. +2
    -1
      utils/compile_&_bundle.sh

+ 0
- 7
Consulta_project/polls/templates/polls/stats.html View File

@@ -16,12 +16,6 @@
</div>
</div>

<div class="row d-flex justify-content-center">
<div class="col" style="margin-top: 15px;margin-bottom: 15px;">
<canvas id="stats"></canvas>
</div>
</div>

{% for question in poll.get_questions %}

{% if question.get_answers and question.answers_have_votes %}
@@ -79,5 +73,4 @@
{% block bottom_scripts %}
<!-- <script type="text/javascript" src="{% static 'js/stats_compiled.js' %}"></script> -->
<script type="text/javascript" src="{% static 'js/bundle.js' %}"></script>
<script type="text/javascript" src="{% static 'js/stats_test_compiled.js' %}"></script>
{% endblock %}

utils/compile_es_to_js.sh → utils/compile_&_bundle.sh View File

@@ -1 +1,2 @@
npx babel ../Consulta_project/landing/static/js/stats.js --out-file ../Consulta_project/landing/static/js/stats_compiled.js --presets=@babel/env
npx babel ../Consulta_project/landing/static/js/stats.js --out-file ../Consulta_project/landing/static/js/stats_compiled.js --presets=@babel/env
webpack ../Consulta_project/landing/static/js/stats_compiled.js ../Consulta_project/landing/static/js/bundle.js

Loading…
Cancel
Save