1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Changed management SQL stuff to work with mutually referential models

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Robert Wittams
2005-12-16 21:32:16 +00:00
parent 356de17636
commit b90ad58b96
3 changed files with 55 additions and 6 deletions

View File

@@ -85,7 +85,6 @@ class ModelBase(type):
if hasattr(new_class, 'objects'):
raise ValueError, "Model %s must specify a custom Manager, because it has a field named 'objects'" % name
new_class.add_to_class('objects', Manager())
# Give the class a docstring -- its definition.
if new_class.__doc__ is None:

View File

@@ -37,7 +37,7 @@ class Options:
def _prepare(self):
if self.order_with_respect_to:
self.order_with_respect_to = self.get_field(order_with_respect_to)
self.order_with_respect_to = self.get_field(self.order_with_respect_to)
self.ordering = ('_order',)
else:
self.order_with_respect_to = None