forked from EGCETSII/decide_django_2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from egc-sierrezuela-3/feature/censo-13
FUNCIONALIDAD DE EXPORTAR CENSO
- Loading branch information
Showing
6 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from django import forms | ||
|
||
class votacionForm(forms.Form): | ||
votacion = forms.IntegerField(label='Id de la votación', widget=forms.TextInput, required=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block extrahead %}{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<h2> Funcionalidad de censos</h2> | ||
|
||
<b> Se han encontrado los siguientes censos: </b> | ||
|
||
{% for c in censos %} | ||
<b> Id del votante:</b> {{c.voter_id}} | ||
{% endfor %} | ||
|
||
<button type="button" onclick="location.href='exportCSV/'">Exportar censo</button> | ||
{% endblock %} | ||
|
||
|
||
{% block extrabody %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block extrahead %}{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<h2> Módulo de censos</h2> | ||
|
||
<h3> Exportación de censo</h3> | ||
|
||
<form id="formulario" method="post" action='''>{% csrf_token %} | ||
{{formulario}} | ||
<input type='submit' value='Buscar censos de esta votación'/> | ||
</form> | ||
|
||
{% if censos %} | ||
{% for c in censos %} | ||
Id del votante: {{c.voter_id}} | ||
<br> | ||
{% endfor %} | ||
|
||
<br> | ||
<button type="button" onclick="location.href='exportCSV/{{idVotacion}}'">Exportar censo</button> | ||
|
||
{% endif %} | ||
|
||
{% endblock %} | ||
|
||
{% block extrabody %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters