#9743: Problem in admin when displaying foreignkey of a model that reference
himself
--------------------------------------------+-------------------------------
   Reporter:  daniels                       |                Owner:  nobody    
     Status:  new                           |            Milestone:            
  Component:  Database layer (models, ORM)  |              Version:  1.0       
   Keywords:                                |                Stage:  Unreviewed
  Has_patch:  1                             |           Needs_docs:  0         
Needs_tests:  0                             |   Needs_better_patch:  0         
--------------------------------------------+-------------------------------
 {{{
 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.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9743>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to