Cleaned up dereferencing

Dereferencing now respects max_depth, so should be more performant.
Reload is chainable and can be passed a max_depth for dereferencing
Added an Observer for ComplexBaseFields.

Refs #324 #323 #289
Closes #320
This commit is contained in:
Ross Lawley
2011-11-25 08:28:20 -08:00
parent 5e553ffaf7
commit 83fff80b0f
6 changed files with 122 additions and 97 deletions

View File

@@ -1675,6 +1675,8 @@ class QuerySet(object):
.. versionadded:: 0.5
"""
from dereference import dereference
# Make select related work the same for querysets
max_depth += 1
return dereference(self, max_depth=max_depth)