title: Django - How to Define a Model with 2 Field Types for a JSON Import
body: <p>I'm trying to import data from a JSON file. One of the keys has a value that is either an integer or the word "false" like this:</p>
  
  <pre><code>"mc": 75
  </code></pre>
  
  <p>or</p>
  
  <pre><code>"mc": false
  </code></pre>
  
  <p>In my models.py file, I don't know how to define the field for the "mc" database entries, since it has 2 kinds of field types (integers or the word false). Is a generic relation appropriate for this <a href="https://docs.djangoproject.com/en/1.2/ref/contrib/contenttypes/#generic-relations" rel="nofollow">https://docs.djangoproject.com/en/1.2/ref/contrib/contenttypes/#generic-relations</a>? Or should I just make it a CharField like this?</p>
  
  <pre><code>mc = models.CharField(max_length=5)
  </code></pre>
  
  <p>I don't know if it matters, but "mc" is referring to the "mana cost" of an item for a game. So if the item usage doesn't have a mana cost, then the value is "false."</p>