title: Creating an union-like related models
body: <p>I have a Django app with a model called <code>OS</code> (as in "Operating System"). The model has some usual fields, like <code>name</code> or <code>version</code>. Those fields are common to all operating systems.</p>
  
  <p>I also have two other (related) models, called <code>Linux</code> and <code>Windows</code>. Those have some OS-specific fields (<code>Linux</code> has a <code>desktop_environment</code>, as in "KDE" or "Gnome", <code>apps_manager</code>, as in "apt", pacman", etc...; <code>Windows</code> has a <code>built_in_antivirus</code> field, etc...). This means that those two models have completely different fields, that make sense only for specific operating systems.</p>
  
  <p>The <code>OS</code> model has a OneToOne relation with both the <code>Linux</code> and the <code>Windows</code> models, but only one of those 2 actually exists (an OS can't be Linux and Windows at the same time).</p>
  
  <p>How can I create some sort of "relation", "attribute", "manager" or XYZ property so I can access the fields of <code>Linux</code> and <code>Windows</code> from an instance of an <code>OS</code> model?</p>
  
  <p>Example:</p>
  
  <pre><code>a = OS.objects.get(pk=3) # This is a Windows instance
  a.&lt;magic&gt;.built_in_antivirus
  True
  
  b = OS.objects.get(pk=14) # This is a Linux instance
  b.&lt;magic&gt;.desktop_environment
  </code></pre>
  
  <p>Please note that I don't want to move all fields to the same model.</p>