title: ValueError: Related model u'app.model' cannot be resolved
body: <p>I have two applications (<code>ook</code> and <code>eek</code> say) and I want to use a foreign key to a model in <code>ook</code> from a model in <code>eek</code>. Both are in <code>INSTALLED_APPS</code> with <code>ook</code> first.</p>
  
  <p>In <code>ook.models.py</code>, i have:</p>
  
  <pre><code>class Fubar(models.Model):
      ...
  </code></pre>
  
  <p>In <code>eek.models.py</code>, I have:</p>
  
  <pre><code>class monkey(models.Model):
      external = models.ForeignKey('ook.Fubar', blank=True, null=True)
      ...
  </code></pre>
  
  <p>The migration generated is:</p>
  
  <pre><code>class Migration(migrations.Migration):
  
      dependencies = [
          ('eek', '0002_auto_20151029_1040'),
      ]
  
      operations = [
          migrations.AlterField(
              model_name='monkey',
              name='external',
              field=models.ForeignKey(blank=True, to='ook.Fubar', null=True),
          ),
      ]
  </code></pre>
  
  <p>When I run the migration, I get this error:</p>
  
  <pre><code>   ...
     1595             raise ValueError('Foreign Object from and to fields must be
  the same non-zero length')
     1596         if isinstance(self.rel.to, six.string_types):
  -&gt; 1597             raise ValueError('Related model %r cannot be resolved' % self.rel.to)
     1598         related_fields = []
     1599         for index in range(len(self.from_fields)):
  ValueError: Related model u'ook.Fubar' cannot be resolved
  </code></pre>
  
  <p><strong>What am I doing wrong?</strong></p>