Hy,
i met a recursive error in admin feature.
- I noticed that somes models admin's views are not affected by the
error.
- produce only in add/ and per-entry view (update page of entry)
- list views shows me all my entry with no problem for all models
declared
I reproduce this error with multi Django version : checkout,
Django-1.0.2-final.
and with hosting with mod_python and wsgi
i'have 2 hyppotheses not confirmed :
- i suspect encoding error some where but i can't desesperatly found
the l'origin.
can some data from DB cause this ?
- i miss to apply some evolution for "new" admin site models or url
resolver helper
please, try to give me some pointers.
django is a very sexy framework, so good design and intuitive
thanks in advance.
Traces :
Traceback (most recent call last):
File "/home/pozzonuovo/django/django/core/handlers/base.py", line
92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/pozzonuovo/django/django/contrib/admin/sites.py", line
490, in root
return self.model_page(request, *url.split('/', 2))
File "/home/pozzonuovo/htdocs/django/django/views/decorators/
cache.py", line 44, in _wrapped_view_func
File "/home/pozzonuovo/django/django/contrib/admin/sites.py", line
509, in model_page
return admin_obj(request, rest_of_url)
File "/home/pozzonuovo/django/django/contrib/admin/options.py", line
1098, in __call__
return self.change_view(request, unquote(url))
File "/home/pozzonuovo/django/django/db/transaction.py", line 240,
in _commit_on_success
res = func(*args, **kw)
File "/home/pozzonuovo/django/django/contrib/admin/options.py", line
873, in change_view
return self.render_change_form(request, context, change=True,
obj=obj)
File "/home/pozzonuovo/django/django/contrib/admin/options.py", line
590, in render_change_form
], context, context_instance=context_instance)
File "/home/pozzonuovo/django/django/shortcuts/__init__.py", line
20, in render_to_response
return HttpResponse(loader.render_to_string(*args, **kwargs),
**httpresponse_kwargs)
File "/home/pozzonuovo/django/django/template/loader.py", line 108,
in render_to_string
return t.render(context_instance)
File "/home/pozzonuovo/django/django/template/__init__.py", line
178, in render
return self.nodelist.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
779, in render
bits.append(self.render_node(node, context))
File "/home/pozzonuovo/django/django/template/__init__.py", line
792, in render_node
return node.render(context)
File "/home/pozzonuovo/django/django/template/loader_tags.py", line
97, in render
return compiled_parent.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
178, in render
return self.nodelist.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
779, in render
bits.append(self.render_node(node, context))
File "/home/pozzonuovo/django/django/template/__init__.py", line
792, in render_node
return node.render(context)
File "/home/pozzonuovo/django/django/template/loader_tags.py", line
97, in render
return compiled_parent.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
178, in render
return self.nodelist.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
779, in render
bits.append(self.render_node(node, context))
File "/home/pozzonuovo/django/django/template/__init__.py", line
792, in render_node
return node.render(context)
File "/home/pozzonuovo/django/django/template/loader_tags.py", line
24, in render
result = self.nodelist.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
779, in render
bits.append(self.render_node(node, context))
File "/home/pozzonuovo/django/django/template/__init__.py", line
792, in render_node
return node.render(context)
File "/home/pozzonuovo/django/django/template/defaulttags.py", line
155, in render
nodelist.append(node.render(context))
File "/home/pozzonuovo/django/django/template/loader_tags.py", line
111, in render
return self.template.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
178, in render
return self.nodelist.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
779, in render
bits.append(self.render_node(node, context))
File "/home/pozzonuovo/django/django/template/__init__.py", line
792, in render_node
return node.render(context)
File "/home/pozzonuovo/django/django/template/defaulttags.py", line
155, in render
nodelist.append(node.render(context))
File "/home/pozzonuovo/django/django/template/defaulttags.py", line
155, in render
nodelist.append(node.render(context))
File "/home/pozzonuovo/django/django/template/defaulttags.py", line
244, in render
return self.nodelist_false.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
779, in render
bits.append(self.render_node(node, context))
File "/home/pozzonuovo/django/django/template/__init__.py", line
792, in render_node
return node.render(context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
831, in render
return _render_value_in_context(output, context)
File "/home/pozzonuovo/django/django/template/__init__.py", line
811, in _render_value_in_context
value = force_unicode(value)
File "/home/pozzonuovo/django/django/utils/encoding.py", line 71, in
force_unicode
s = unicode(s)
File "/home/pozzonuovo/django/django/forms/forms.py", line 356, in
__unicode__
return self.as_widget()
File "/home/pozzonuovo/django/django/forms/forms.py", line 391, in
as_widget
return widget.render(name, data, attrs=attrs)
File "/home/pozzonuovo/django/django/contrib/admin/widgets.py", line
225, in render
related_url = reverse('admin:%s_%s_add' % info,
current_app=self.admin_site.name)
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
319, in reverse
app_list = resolver.app_dict[ns]
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
208, in _get_app_dict
self._populate()
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
188, in _populate
lookups.appendlist(pattern.callback, (bits, p_pattern))
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
137, in _get_callback
mod_name, func_name = get_mod_func(self._callback_str)
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line 81,
in get_mod_func
dot = callback.rindex('.')
AttributeError: 'HttpResponseRedirect' object has no attribute
'rindex'
<ModPythonRequest
path:/admin/distributeur/distrib/21/,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'__utma':
'186146216.1003984230.1248376488.1248692393.1248723982.12',
'__utmc': '186146216',
'__utmz': '186146216.1248376488.1.1.utmccn=(direct)|utmcsr=(direct)|
utmcmd=(none)',
'sessionid': '12a62eaf5adb49ca531aafcee4bcc985'},
META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0L,
'CONTENT_TYPE': None,
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE':
'__utma=186146216.1003984230.1248376488.1248692393.1248723982.12;
__utmz=186146216.1248376488.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=
(none); __utmc=186146216; sessionid=12a62eaf5adb49ca531aafcee4bcc985',
'HTTP_HOST': 'www.foobar.fr',
'HTTP_KEEP_ALIVE': '300',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.0.11)
Gecko/2009061212 Iceweasel/3.0.6 (Debian-3.0.6-1)',
'PATH_INFO': u'/admin/distributeur/distrib/21/',
'PATH_TRANSLATED': None,
'QUERY_STRING': None,
'REMOTE_ADDR': '82.233.116.239',
'REMOTE_HOST': None,
'REMOTE_IDENT': None,
'REMOTE_USER': None,
'REQUEST_METHOD': 'GET',
'SCRIPT_NAME': '',
'SERVER_NAME': 'foobar.fr',
'SERVER_PORT': 80,
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'mod_python'}>
TemplateSyntaxError at /admin/distributeur/distrib/21/
Caught an exception while rendering: 'HttpResponseRedirect' object has
no attribute 'rindex'
Original Traceback (most recent call last):
File "/home/pozzonuovo/htdocs/django/django/template/debug.py", line
71, in render_node
File "/home/pozzonuovo/htdocs/django/django/template/debug.py", line
87, in render
File "/home/pozzonuovo/django/django/utils/encoding.py", line 71, in
force_unicode
s = unicode(s)
File "/home/pozzonuovo/django/django/forms/forms.py", line 356, in
__unicode__
return self.as_widget()
File "/home/pozzonuovo/django/django/forms/forms.py", line 391, in
as_widget
return widget.render(name, data, attrs=attrs)
File "/home/pozzonuovo/django/django/contrib/admin/widgets.py", line
225, in render
related_url = reverse('admin:%s_%s_add' % info,
current_app=self.admin_site.name)
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
319, in reverse
app_list = resolver.app_dict[ns]
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
208, in _get_app_dict
self._populate()
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
188, in _populate
lookups.appendlist(pattern.callback, (bits, p_pattern))
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
137, in _get_callback
mod_name, func_name = get_mod_func(self._callback_str)
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line 81,
in get_mod_func
dot = callback.rindex('.')
AttributeError: 'HttpResponseRedirect' object has no attribute
'rindex'
Request Method: GET
Request URL: http://www.foobar.fr/admin/distributeur/distrib/21/
Exception Type: TemplateSyntaxError
Exception Value:
Caught an exception while rendering: 'HttpResponseRedirect' object has
no attribute 'rindex'
Original Traceback (most recent call last):
File "/home/pozzonuovo/htdocs/django/django/template/debug.py", line
71, in render_node
File "/home/pozzonuovo/htdocs/django/django/template/debug.py", line
87, in render
File "/home/pozzonuovo/django/django/utils/encoding.py", line 71, in
force_unicode
s = unicode(s)
File "/home/pozzonuovo/django/django/forms/forms.py", line 356, in
__unicode__
return self.as_widget()
File "/home/pozzonuovo/django/django/forms/forms.py", line 391, in
as_widget
return widget.render(name, data, attrs=attrs)
File "/home/pozzonuovo/django/django/contrib/admin/widgets.py", line
225, in render
related_url = reverse('admin:%s_%s_add' % info,
current_app=self.admin_site.name)
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
319, in reverse
app_list = resolver.app_dict[ns]
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
208, in _get_app_dict
self._populate()
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
188, in _populate
lookups.appendlist(pattern.callback, (bits, p_pattern))
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line
137, in _get_callback
mod_name, func_name = get_mod_func(self._callback_str)
File "/home/pozzonuovo/django/django/core/urlresolvers.py", line 81,
in get_mod_func
dot = callback.rindex('.')
AttributeError: 'HttpResponseRedirect' object has no attribute
'rindex'
Exception Location: /home/pozzonuovo/django/django/template/
__init__.py in render, line 779
Python Executable: /usr/local/bin/python
Python Version: 2.5.4
Python Path: ['/home/pozzonuovo/django', '/home/pozzonuovo/htdocs/',
'/home/pozzonuovo/htdocs/pozzonuovo', '/usr/local/lib/python2.5/site-
packages/setuptools-0.6c9-py2.5.egg', '/usr/local/lib/python2.5/site-
packages/pytz-2009g-py2.5.egg', '/usr/local/lib/python2.5/site-
packages/Pygments-1.0-py2.5.egg', '/usr/local/lib/python2.5/site-
packages/Trac-0.11.4-py2.5.egg', '/usr/local/lib/python2.5/site-
packages/Genshi-0.5.1-py2.5-freebsd-6.4-RELEASE-p1-i386.egg', '/usr/
local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/local/lib/
python2.5/plat-freebsd6', '/usr/local/lib/python2.5/lib-tk', '/usr/
local/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-
packages', '/usr/local/lib/python2.5/site-packages/PIL', '/usr/local/
lib/python2.5/site-packages']
Server time: lun, 27 Jul 2009 22:45:16 +0200
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---