Code

Opened 7 years ago

Closed 7 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
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.