title: Django use Integer Field as ForeignKey field
body: <p>To support old (legacy) db we have to create a table that using <strong>integer field</strong> as a <strong>foreignkey</strong> to <strong>User</strong> table: This is how our model look like:</p>
  
  <pre><code>class UserHistory():
      user_id = models.IntegerField(null=True, blank=True)
      # ..... (other fields) .....
  </code></pre>
  
  <p>Problem is user id may or may not exist in User table. Is there any way to treat that user_id field as foreign key to user talbe (when it exist)? So I can dis play on django admin or other place instead of just the ID.</p>