List Info

Thread: Problem with order_with_respect_to




Problem with order_with_respect_to
user name
2006-10-30 12:42:05
Hi,

i have a problem with the order_with_respect_to field in the
Meta-Class. Editing the Model in the Admin interface (Saving
new
levels) i get the exception:

You can't specify target table 'heracles_level' for update
in FROM
clause

If i remove the order_with_respect_to field, it works fine.



The Model:

class Attribute(models.Model):
    Name = models.CharField("Name of attribute
displayed",
maxlength=200, core=True)
    class Admin:
        list_display = ('Name', 'BlazeType')
        pass



class Level(models.Model):
    IsAttrib = models.ForeignKey(Attribute,
edit_inline=models.TABULAR,
min_num_in_admin=6, num_in_admin=6, num_extra_on_change=6)

    class Meta:
        order_with_respect_to = 'IsAttrib'



Has someone an idea?
Daniel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Problem with order_with_respect_to
user name
2006-10-30 13:40:25
I'm guessing you're using MySQL? I believe
order_with_respect_to has
been broken for a while now when used with MySQL. I haven't
been able
to get it working since I can remember.

There is a ticket regarding this issue...

http://code
.djangoproject.com/ticket/1760


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )