title: Django F expression with foreign key
body: <p>I want to order model using F expression.</p>
  
  <p>On same model (idmm), <code>long</code> attribute is working</p>
  
  <pre><code>ExpressionWrapper(
          (lat - Func(F('long'), function='x')),
          output_field=FloatField()
      )
  </code></pre>
  
  <p>but on foreign model (foreign) with accessor idmm__long</p>
  
  <pre><code>ExpressionWrapper(
          (lat - Func(F('idmm__long'), function='x')),
          output_field=FloatField()
      )
  </code></pre>
  
  <p>it is not working.</p>
  
  <p>Running this query <code>foreing.objects.all()[0].idmm.long</code> in shell is working fine.</p>
  
  <p>Any suggestions are welcome.</p>
  
  <p>Error i get is: "TypeError: a float is required"</p>