I am a beginner with DJANGO, I am working on a project where one of the models contains a JSONField. In the code at some point i need to detect and process the JSONField only and so I get the internaltype of the fields and if it turns out to be JSON field then I process it.
for field in obj._meta.fields:
#find the fields with JSONField type
if obj._meta.get_field(field.name).get_internal_type() == 'JSONField':
It works well on my machine, however when I upload the same code on the server, it does not execute, as, the internaltype of the JSONField is returned as a TextField and the logic fails there. What could be wrong and why is the JSONField being detected as a TextField?
The postgres version being used on the server is 9.6.1