#8110: Admin interface: 'long' object has no attribute 'isdigit'
--------------------------------------+-------------------------------------
          Reporter:  anonymous        |         Owner:  nobody
            Status:  reopened         |     Milestone:  1.0   
         Component:  Admin interface  |       Version:  1.0   
        Resolution:                   |      Keywords:        
             Stage:  Accepted         |     Has_patch:  1     
        Needs_docs:  0                |   Needs_tests:  0     
Needs_better_patch:  0                |  
--------------------------------------+-------------------------------------
Comment (by kmtracey):

 Replying to [comment:9 julianb]:
 > I don't know what causes the error, somehow {{{self.user}}} can be
 {{{long}}} sometimes. If I continuously refresh my admin page the error
 appears frequently now. The patch fixes it.

 It would be good to understand how it comes about that sometimes
 `self.user` is a `long`.  Looking at the code, one way would be if
 `render` was called more than once for the same `AdminLogNode`, since
 render itself rebinds `self.user` from the `user` variable name to the
 identified user's ID.  I'm going to attach a patch that avoids doing that.
 Could you try running with it and seeing if it also prevents the error?
 If so, then the next question will by why is `render` being called
 multiple times for the same `AdminLogNode`?  I thought that would only
 happen if the template tag (`get_admin_log` in this case) was placed
 inside a loop in the template.  It's not in a loop in the admin/index.html
 file.  Have you customized this file or do you have another template that
 uses `get_admin_log` in a loop?  (I am unable to recreate the error myself
 by refreshing the admin page to the limits of my patience.)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8110#comment:10>
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