Fast solution:
In Javascritp you can do this:
element = document.getElementById("myinput");
window.open("
http://127.0.0.1:8000/consulta/?consulta="+element.value, "MsgWindow", "width=200, height=100");
but continue reading
Are you use ajax?
If the answer is not, then see
https://github.com/yceruto/django-ajax.
A concept problem is there, modal is a interface view (in the browser) and your method refresh the page (It is a GET Request).
I don't know what kind of framework you are using, but in general you can do something like this:
<div id="mymodal" class="modal">
Operadora Tipo
CLARO MOVEL
</div>
<script>
$("#mymodal").modal();
</script>
for more information see
http://getbootstrap.com/javascript/#modalshttp://jqueryui.com/dialog/PD: You can do better implementation if you are using django ajax