I have a certain field in my database which is a textfield. However, for a certain use I have a set of records that only include numbers (saved as a string of course) and I want to query them using "gte" (greater than). Normally I would do:
MyTable.objects.filter(text_field__gte=100)
However, this does not return any results. It seems that I need to cast this field as an integer. Can I do that within this same query? The actual query is more cumbersome and involves external tables (something like MyTable.objects.filter(associated_table__other_table__text_field__gte=100)), but I am simplifying above for clarity.