Problem in admin when displaying foreignkey of a model that reference himself
class Client(models.Model):
name = models.CharField()
class Module(models.Model):
client = models.ForeignKey(Client)
class SuperModule(Module):
sample = models.ForeignKey(Module)
If in the django.admin.contrib, we want to display SuperModule with a
list_display = ('name', 'client')
it will not work unless we remove the foreign key to Module.
It was not tested with the simple code above, but in our complete code.
After some investigation, I found a way where an error occured when doing 'as_sql()' on a
query_set. The error was about an extra parameter to avoid.update(). And some lines below,
the same function call but with a small difference in parenthesis and works OK.
daniels,