Django ForeignKey to Generic Python Data Type?

Since you want to filter, you would need some kind of DB support for your field and json field won't be that valuable for you. You can use some different solution with different complication levels according to your actual need. One suggestion is to serialize your data to string.

Pad with enough zeros for string/integer/float sorting. Now you can filter all your stuff as string (make sure you pad the value you are filtering by as well). Add a data_type column for fetching the right python object.

JSONField would work, but it won't handle Decimal as is.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions