#20143: Lazy loading of related fields does not work
-------------------------------------+-------------------------------------
     Reporter:  andreas_pelme        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.5
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by nip3o):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Reproduced on Ubuntu 12.04 LTS, Django 1.4.3 and Django 1.5
 {{{

 $ DJANGO_SETTINGS_MODULE=lazy_model_loading.settings python
 Python 2.7.3 (default, Aug  1 2012, 05:14:39)
 [GCC 4.6.3] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from foo.models import Foo
 >>> Foo()
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py",
 line 397, in __init__
     val = field.get_default()
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/models/fields/related.py", line 1038, in get_default
     if isinstance(field_default, self.rel.to):
 TypeError: isinstance() arg 2 must be a class, type, or tuple of classes
 and types

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20143#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to