Opened 11 years ago

Closed 11 years ago

#21349 closed Uncategorized (invalid)

Can't Access User page in Admin

Reported by: anonymous Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Normal Keywords: User Admin sqlite
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

On changing to mysqlite and going to the Admin User page, when I click on a User I get the error below.

It works when a test with python manage.py runserver, but not on apache.

Any help much appreciated, let me know if you need more info.

Cheers,

Julian

PS Have used * as security measure below.

Environment:

Request Method: GET
Request URL: http://***/admin/auth/user/168/
Django Version: 1.2.7
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',

'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.comments',
'',
'django.contrib.admin',
'south']

Installed Middleware:
('django.middleware.common.CommonMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Template error:
In template /usr/local/lib/python2.6/dist-packages/django/contrib/admin/templates/admin/includes/fieldset.html, error at line 19

Caught AttributeError while rendering: 'unicode' object has no attribute 'date'
9 : {% for field in line %}

10 : <div{% if not line.fields|length_is:'1' %} class="field-box{% if not field.is_readonly and field.errors %} errors{% endif %}"{% endif %}>

11 : {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}

12 : {% if field.is_checkbox %}

13 : {{ field.field }}{{ field.label_tag }}

14 : {% else %}

15 : {{ field.label_tag }}

16 : {% if field.is_readonly %}

17 : <p>{{ field.contents }}</p>

18 : {% else %}

19 : {{ field.field }}

20 : {% endif %}

21 : {% endif %}

22 : {% if field.field.help_text %}

23 : <p class="help">{{ field.field.help_text|safe }}</p>

24 : {% endif %}

25 : </div>

26 : {% endfor %}

27 : </div>

28 : {% endfor %}

29 : </fieldset>

Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response

  1. response = callback(request, *callback_args, callback_kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py" in wrapper

  1. return self.admin_site.admin_view(view)(*args, kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py" in _wrapped_view

  1. response = view_func(request, *args, kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func

  1. response = view_func(request, *args, kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/sites.py" in inner

  1. return view(request, *args, kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py" in _wrapper

  1. return decorator(bound_func)(*args, kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py" in _wrapped_view

  1. response = view_func(request, *args, kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py" in bound_func

  1. return func(self, *args2, kwargs2)

File "/usr/local/lib/python2.6/dist-packages/django/db/transaction.py" in _commit_on_success

  1. res = func(*args, kw)

File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py" in change_view

  1. return self.render_change_form(request, context, change=True, obj=obj)

File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py" in render_change_form

  1. ], context, context_instance=context_instance)

File "/usr/local/lib/python2.6/dist-packages/django/shortcuts/init.py" in render_to_response

  1. return HttpResponse(loader.render_to_string(*args, kwargs), httpresponse_kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/template/loader.py" in render_to_string

  1. return t.render(context_instance)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. return self._render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in _render

  1. return self.nodelist.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/loader_tags.py" in render

  1. return compiled_parent._render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in _render

  1. return self.nodelist.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/loader_tags.py" in render

  1. return compiled_parent._render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in _render

  1. return self.nodelist.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/loader_tags.py" in render

  1. result = block.nodelist.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py" in render

  1. nodelist.append(node.render(context))

File "/usr/local/lib/python2.6/dist-packages/django/template/loader_tags.py" in render

  1. return self.template.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. return self._render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in _render

  1. return self.nodelist.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py" in render

  1. nodelist.append(node.render(context))

File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py" in render

  1. nodelist.append(node.render(context))

File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py" in render

  1. return self.nodelist_false.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py" in render

  1. return self.nodelist_false.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/init.py" in render

  1. bits.append(self.render_node(node, context))

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render_node

  1. result = node.render(context)

File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py" in render

  1. output = force_unicode(output)

File "/usr/local/lib/python2.6/dist-packages/django/utils/encoding.py" in force_unicode

  1. s = unicode(s)

File "/usr/local/lib/python2.6/dist-packages/django/forms/forms.py" in unicode

  1. return self.as_widget() + self.as_hidden(only_initial=True)

File "/usr/local/lib/python2.6/dist-packages/django/forms/forms.py" in as_widget

  1. return widget.render(name, data, attrs=attrs)

File "/usr/local/lib/python2.6/dist-packages/django/forms/widgets.py" in render

  1. value = self.decompress(value)

File "/usr/local/lib/python2.6/dist-packages/django/forms/widgets.py" in decompress

  1. return [value.date(), value.time().replace(microsecond=0)]

Exception Type: TemplateSyntaxError at /admin/auth/user/168/
Exception Value: Caught AttributeError while rendering: 'unicode' object has no attribute 'date'

Change History (1)

comment:1 by Tim Graham, 11 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top