I\'m developing a web page using django and I want to add some javascript to a form using jQuery. Basically I want to select an option in a form depending on an another selectio
You can check like this to get the text of the selected (for your first code block):
$("#id_adeudado :selected").text();
And this to set the selected value by the text:
$("#id_adeudado option").filter(function() { return this.value == '{{ usuario.username }}'; }).attr('selected', true);