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

 Replying to [comment:22 kmtracey]:
 > I am confused by your traceback included above.  The one that starts
 "Original traceback" and starts with "django/template/debug.py", line
 71,"...yet this bug you and everyone else reports only occurs with DEBUG
 set to False.  There is also no mention of django/template/debug.py in the
 original posted traceback, nor any indication that there are multiple
 exceptions raised...so all in all I find that traceback info confusing.

 To get my traceback I did uncomment the ADMIN settings variable in
 settings_local.py (from the byteflow installation). Thus I got the error
 500 traceback mailed. The complete traceback reads (I have slighty
 formatted the output because c&p from my webclient did not copy carridge
 returns):

 {{{
 Traceback (most recent call last): File "/usr/local/lib/python2.5/site-
 packages/django/core/handlers/base.py", line 86, in get_response response
 = callback(request, *callback_args, **callback_kwargs)

 File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/sites.py", line 145, in root return
 self.index(request)

 File "/usr/local/lib/python2.5/site-
 packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
 response = view_func(request, *args, **kwargs)

 File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/sites.py", line 319, in index
 context_instance=template.RequestContext(request)

 File "/usr/local/lib/python2.5/site-
 packages/django/shortcuts/__init__.py", line 18, in render_to_response
 return HttpResponse(loader.render_to_string(*args, **kwargs),
 **httpresponse_kwargs)

 File "/usr/local/lib/python2.5/site-packages/django/template/loader.py",
 line 107, in render_to_string return t.render(context_instance)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 176, in render return self.nodelist.render(context)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 768, in render bits.append(self.render_node(node, context))

 File "/usr/local/lib/python2.5/site-packages/django/template/debug.py",
 line 71, in render_node result = node.render(context)

 File "/usr/local/lib/python2.5/site-
 packages/django/template/loader_tags.py", line 97, in render return
 compiled_parent.render(context)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 176, in render return self.nodelist.render(context)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 768, in render bits.append(self.render_node(node, context))

 File "/usr/local/lib/python2.5/site-packages/django/template/debug.py",
 line 71, in render_node result = node.render(context)

 File "/usr/local/lib/python2.5/site-
 packages/django/template/loader_tags.py", line 97, in render return
 compiled_parent.render(context)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 176, in render return self.nodelist.render(context)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 768, in render bits.append(self.render_node(node, context))

 File "/usr/local/lib/python2.5/site-packages/django/template/debug.py",
 line 71, in render_node result = node.render(context)

 File "/usr/local/lib/python2.5/site-
 packages/django/template/loader_tags.py", line 24, in render result =
 self.nodelist.render(context)

 File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py",
 line 768, in render bits.append(self.render_node(node, context))

 File "/usr/local/lib/python2.5/site-packages/django/template/debug.py",
 line 81, in render_node raise wrapped TemplateSyntaxError: Caught an
 exception while rendering: 'int' object has no attribute 'isdigit'

 Original Traceback (most recent call last): File "/usr/local/lib/python2.5
 /site-packages/django/template/debug.py", line 71, in render_node result =
 node.render(context)

 File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/templatetags/log.py", line 17, in render if
 not self.user.isdigit(): AttributeError: 'int' object has no attribute
 'isdigit'
 }}}

 I know that casting from int to string is just a workaround and there must
 be a bug somewhere in the template stuff or otherwise.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8110#comment:23>
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 django-updates@googlegroups.com
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