#3914: Self-referencing keys in the list_display kills development server with 
no
error thrown
-------------------------------------------+--------------------------------
   Reporter:  [EMAIL PROTECTED]           |                Owner:  adrian       
  
     Status:  new                          |            Component:  Admin 
interface
    Version:  SVN                          |           Resolution:              
   
   Keywords:  self-reference list_display  |                Stage:  Unreviewed  
   
  Has_patch:  0                            |           Needs_docs:  0           
   
Needs_tests:  0                            |   Needs_better_patch:  0           
   
-------------------------------------------+--------------------------------
Changes (by adrian):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Old description:

> If you use this model:
> 
> class Page(models.Model):
>     title = models.CharField(maxlength=192)
>     default = models.BooleanField()
>     template = models.CharField(maxlength=256)
>     parent = models.ForeignKey('Page')
>     sequence = models.IntegerField()
>     visible_on_menu = models.BooleanField()
>     defined_header = models.CharField(maxlength=256)
>     date_of_creation = models.DateTimeField()
>     class Admin:
>         list_display = ['title','parent','visible_on_menu']
> 
> And try to go to the model in the admin interface, the development server
> just dies.  There is no error, it just goes back to a command prompt
> waiting.
> 
> This model is to be used for a newforms-like setup that can have
> parent/child pages for building heirarchical navigation menus - and it
> will be handy to see the parent in the display.

New description:

 If you use this model:
 
 {{{
 #!python
 class Page(models.Model):
     title = models.CharField(maxlength=192)
     default = models.BooleanField()
     template = models.CharField(maxlength=256)
     parent = models.ForeignKey('Page')
     sequence = models.IntegerField()
     visible_on_menu = models.BooleanField()
     defined_header = models.CharField(maxlength=256)
     date_of_creation = models.DateTimeField()
     class Admin:
         list_display = ['title','parent','visible_on_menu']
 }}}
 
 And try to go to the model in the admin interface, the development server
 just dies.  There is no error, it just goes back to a command prompt
 waiting.
 
 This model is to be used for a newforms-like setup that can have
 parent/child pages for building heirarchical navigation menus - and it
 will be handy to see the parent in the display.

Comment:

 (Fixed formatting in description.)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3914#comment:1>
Django Code <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