Index: django/db/models/base.py
===================================================================
--- django/db/models/base.py	(revision 6898)
+++ django/db/models/base.py	(working copy)
@@ -191,12 +191,6 @@
         opts = cls._meta
         opts._prepare(cls)
 
-        if opts.order_with_respect_to:
-            cls.get_next_in_order = curry(cls._get_next_or_previous_in_order, is_next=True)
-            cls.get_previous_in_order = curry(cls._get_next_or_previous_in_order, is_next=False)
-            setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % cls.__name__.lower(), curry(method_get_order, cls))
-            setattr(opts.order_with_respect_to.rel.to, 'set_%s_order' % cls.__name__.lower(), curry(method_set_order, cls))
-
         # Give the class a docstring -- its definition.
         if cls.__doc__ is None:
             cls.__doc__ = "%s(%s)" % (cls.__name__, ", ".join([f.attname for f in opts.fields]))
@@ -436,37 +430,6 @@
             setattr(self, cachename, get_image_dimensions(filename))
         return getattr(self, cachename)
 
-############################################
-# HELPER FUNCTIONS (CURRIED MODEL METHODS) #
-############################################
-
-# ORDERING METHODS #########################
-
-def method_set_order(ordered_obj, self, id_list):
-    qn = connection.ops.quote_name
-    cursor = connection.cursor()
-    # Example: "UPDATE poll_choices SET _order = %s WHERE poll_id = %s AND id = %s"
-    sql = "UPDATE %s SET %s = %%s WHERE %s = %%s AND %s = %%s" % \
-        (qn(ordered_obj._meta.db_table), qn('_order'),
-        qn(ordered_obj._meta.order_with_respect_to.column),
-        qn(ordered_obj._meta.pk.column))
-    rel_val = getattr(self, ordered_obj._meta.order_with_respect_to.rel.field_name)
-    cursor.executemany(sql, [(i, rel_val, j) for i, j in enumerate(id_list)])
-    transaction.commit_unless_managed()
-
-def method_get_order(ordered_obj, self):
-    qn = connection.ops.quote_name
-    cursor = connection.cursor()
-    # Example: "SELECT id FROM poll_choices WHERE poll_id = %s ORDER BY _order"
-    sql = "SELECT %s FROM %s WHERE %s = %%s ORDER BY %s" % \
-        (qn(ordered_obj._meta.pk.column),
-        qn(ordered_obj._meta.db_table),
-        qn(ordered_obj._meta.order_with_respect_to.column),
-        qn('_order'))
-    rel_val = getattr(self, ordered_obj._meta.order_with_respect_to.rel.field_name)
-    cursor.execute(sql, [rel_val])
-    return [r[0] for r in cursor.fetchall()]
-
 ##############################################
 # HELPER FUNCTIONS (CURRIED MODEL FUNCTIONS) #
 ##############################################
Index: django/db/models/fields/related.py
===================================================================
--- django/db/models/fields/related.py	(revision 6898)
+++ django/db/models/fields/related.py	(working copy)
@@ -82,6 +82,14 @@
         related = RelatedObject(other, cls, self)
         self.contribute_to_related_class(other, related)
 
+        opts = other._meta
+
+        if opts.order_with_respect_to:
+            other.get_next_in_order = curry(other._get_next_or_previous_in_order, is_next=True)
+            other.get_previous_in_order = curry(other._get_next_or_previous_in_order, is_next=False)
+            setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % other.__name__.lower(), curry(method_get_order, other))
+            setattr(opts.order_with_respect_to.rel.to, 'set_%s_order' % other.__name__.lower(), curry(method_set_order, other))
+
     def get_db_prep_lookup(self, lookup_type, value):
         # If we are doing a lookup on a Related Field, we must be
         # comparing object instances. The value should be the PK of value,
@@ -823,3 +831,34 @@
         self.multiple = True
 
         assert not (self.raw_id_admin and self.filter_interface), "ManyToManyRels may not use both raw_id_admin and filter_interface"
+
+############################################
+# HELPER FUNCTIONS (CURRIED MODEL METHODS) #
+############################################
+
+# ORDERING METHODS #########################
+
+def method_set_order(ordered_obj, self, id_list):
+    qn = connection.ops.quote_name
+    cursor = connection.cursor()
+    # Example: "UPDATE poll_choices SET _order = %s WHERE poll_id = %s AND id = %s"
+    sql = "UPDATE %s SET %s = %%s WHERE %s = %%s AND %s = %%s" % \
+        (qn(ordered_obj._meta.db_table), qn('_order'),
+        qn(ordered_obj._meta.order_with_respect_to.column),
+        qn(ordered_obj._meta.pk.column))
+    rel_val = getattr(self, ordered_obj._meta.order_with_respect_to.rel.field_name)
+    cursor.executemany(sql, [(i, rel_val, j) for i, j in enumerate(id_list)])
+    transaction.commit_unless_managed()
+
+def method_get_order(ordered_obj, self):
+    qn = connection.ops.quote_name
+    cursor = connection.cursor()
+    # Example: "SELECT id FROM poll_choices WHERE poll_id = %s ORDER BY _order"
+    sql = "SELECT %s FROM %s WHERE %s = %%s ORDER BY %s" % \
+        (qn(ordered_obj._meta.pk.column),
+        qn(ordered_obj._meta.db_table),
+        qn(ordered_obj._meta.order_with_respect_to.column),
+        qn('_order'))
+    rel_val = getattr(self, ordered_obj._meta.order_with_respect_to.rel.field_name)
+    cursor.execute(sql, [rel_val])
+    return [r[0] for r in cursor.fetchall()]
Index: tests/regressiontests/many_to_one_regress/models.py
===================================================================
--- tests/regressiontests/many_to_one_regress/models.py	(revision 6898)
+++ tests/regressiontests/many_to_one_regress/models.py	(working copy)
@@ -23,7 +23,16 @@
     name = models.CharField(max_length=20)
     parent = models.ForeignKey(Parent)
 
+# If ticket #2740 ever slips back in, this model will not be able to be
+# created (order_with_respect_to on a self-referencing relationship).
 
+class Category(models.Model):
+   parent = models.ForeignKey('self')
+
+   class Meta:
+       order_with_respect_to = 'parent'
+
+
 __test__ = {'API_TESTS':"""
 >>> Third.AddManipulator().save(dict(id='3', name='An example', another=None)) 
 <Third: Third object>
