Opened 17 years ago

Closed 17 years ago

#4822 closed (duplicate)

Changeset 5636 causes AttributeError at django/core/urlresolvers.py in resolve, line 234 when using Django's adminstrative interface

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I installed django.contrib.admin to my new project. When I navigate to /admin/, I receive this error:

Traceback (most recent call last):
File "/django/django_src/django/core/handlers/base.py" in get_response

  1. callback, callback_args, callback_kwargs = resolver.resolve(request.path)

File "/django/django_src/django/core/urlresolvers.py" in resolve

  1. sub_match = pattern.resolve(new_path)

File "/django/django_src/django/core/urlresolvers.py" in resolve

  1. sub_match_dict.update([(smart_str(k), v) for k, v in sub_match[2].items()])

AttributeError at /admin/
keys

If I make the following changes to urlresolvers.py, basically undoing changeset 5636:

#sub_match_dict = dict([(smart_str(k), v) for k, v in match.groupdict().items()])
#sub_match_dict.update(self.default_kwargs)
#sub_match_dict.update([(smart_str(k), v) for k, v in sub_match[2].items()])
#return sub_match[0], sub_match[1], sub_match_dict
sub_match_dict = dict(self.default_kwargs, sub_match[2])
return sub_match[0], sub_match[1], dict(match.groupdict(),
sub_match_dict)

the problem goes away and I get the login page for the administrative interface for my project.

This is my first time submitting a bug to an open source project. If I'm unclear, please feel free to contact me at hangonline{at}gmail.com

Change History (1)

comment:1 by anonymous, 17 years ago

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