I am trying to make an attribute increment by 1 every time I search for an item in the database. For example:
criterio = "Alberto"
resultado = Personas.objects.filter(nombre = criterio)
for persona in resultado:
persona.coincidencias += 1
persona.save()
I want to know if there is a neater and quicker way to do it, since this method degrades performance remarkably (in practice that query can throw me hundreds or even thousands of results)