Admin issues on django 1.8
dmoisset opened this issue · 0 comments
dmoisset commented
(I'm reporting on behalf of a mailing list user, so I'm not sure if I can reproduce this)
Soembady reported an admin crash at /admin/corpus/iedocument/add/ . The django error is
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/corpus/iedocument/add/
Django Version: 1.8.14
Python Version: 3.6.1
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'djangular',
'corpus',
'relatives',
'relatedwidget')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Template error:
In template /anaconda/envs/iepy_/lib/python3.6/site-packages/relatives/templates/relatives/change_form.html, error at line 8
tuple index out of range
1 : {% extends "admin/change_form.html" %}
2 :
3 : {% block content %}
4 :
5 : <div id="content-main">
6 :
7 : {% load relatives %}
8 : {% related_objects adminform.form.instance as related_objects %}
9 : <div class="module grp-module" id="filter">
10 : {% block relations %}
11 : <h2>Relations</h2>
12 : <ul>
13 : {% for related in related_objects %}
14 : <li><a href="{{ related.url }}">
15 : {{ related.plural_name|capfirst }}
16 : </a></li>
17 : {% endfor %}
18 : {% endblock relations %}
Traceback:
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/core/handlers/base.py" in get_response
164. response = response.render()
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/response.py" in render
158. self.content = self.rendered_content
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/response.py" in rendered_content
135. content = template.render(context, self._request)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/backends/django.py" in render
74. return self.template.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
210. return self._render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in _render
202. return self.nodelist.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/loader_tags.py" in render
135. return compiled_parent._render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in _render
202. return self.nodelist.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/loader_tags.py" in render
135. return compiled_parent._render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in _render
202. return self.nodelist.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/loader_tags.py" in render
135. return compiled_parent._render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in _render
202. return self.nodelist.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/loader_tags.py" in render
65. result = block.nodelist.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/django/template/base.py" in render
1229. context[self.target_var] = func(*resolved_args, **resolved_kwargs)
File "/anaconda/envs/iepy_/lib/python3.6/site-packages/relatives/templatetags/relatives.py" in related_objects
61. *related.name.split(':')))
Exception Type: IndexError at /admin/corpus/iedocument/add/
Exception Value: tuple index out of range
From a quick search it seems to be a bug in django-relatives: treyhunner/django-relatives#10 which appears in django 1.8 and hasn't been fixed