Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Panel - User Password Change Form ERROR Fix #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jerinisready
Copy link

resolvermatch = urls.resolve(request.path_info)
urls.resolve returns url_variables as *args, but now shifted to **kwargs,

In django admin panel, object-change form passes object-id as as '(<object_id>)' but on user password change view, this object-id is passed in name of '(<id>)'. This causes error on going to change password form. this has been handled in this commit.

ReturnToSiteItem.get_edited_object(request) [Line 115 - 121] 
On Django 2.0+ , resolvermatch.kwargs get object pk either as 'id' in some cases ('user password change form') or as 'object_id' in other cases (usually). for backward compatability for Django's previous versions, id is taken from args.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant