Posts by Artur Fernandes de Souza Filho • 21 points
4 posts
-
1
votes2
answers29
viewsA: Show only second field of the field choises
When you do it on the option you’re iterating inside a tuple of tuples, so I imagine you want to do it like this: {% for opcao in dados.vel %} <option data-select2-id="{{opcao.0 }}">{{ opcao.1…
-
0
votes1
answer95
viewsA: Django is not saving users in the database
You forgot to use the @csrf_protect developer Documentation of the Django @csrf_protect def add_user(request): template_name = 'accounts/add_user.html' context = {} if request.method == 'POST': form…
-
0
votes1
answer57
viewsA: Indexerror: list index out of range
You urged the list here: listaFitness = [] for i in range(tamanhoPopulacao): Then he used her here: listaFitnessIndices = np.argsort(listaFitness)[::-1] But halfway between instantiating her and…
pythonanswered Artur Fernandes de Souza Filho 21 -
1
votes0
answers30
viewsQ: Problems with Count method in a Django queryset
I’m in a strange situation with Django and Count method, I have a queryset that I called ranges and then I have a variable qtd_intervalo where I store the intervalos.count() then I do the tests: if…