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

User password change link #91

Closed
cburza opened this issue Mar 1, 2018 · 2 comments
Closed

User password change link #91

cburza opened this issue Mar 1, 2018 · 2 comments

Comments

@cburza
Copy link

cburza commented Mar 1, 2018

The user password change link no longer works in Django 2.0.2. The help text needs to be formatted to insert the URL.

django/django@c52ae33

oliwarner added a commit to oliwarner/django-authtools that referenced this issue Mar 12, 2018
taymonbeal added a commit to rtcharity/django-authtools that referenced this issue Apr 14, 2019
This contains pull request fusionbox#92 (unmerged upstream), and fixes fusionbox#91.
@weslord
Copy link
Contributor

weslord commented Jun 12, 2019

I was able to work around this by overriding authtools UserAdmin's form with Django's default admin form in my own project.

from django.contrib.auth.forms import UserChangeForm
from authtools.admin import UserAdmin as AuthtoolsUserAdmin


class UserAdmin(AuthtoolsUserAdmin):
    form = UserChangeForm

I haven't been using this for very long, so if there are problems with this approach, please let me know.

@jmorenobl
Copy link

jmorenobl commented Jun 22, 2019

The complete code to make it work until a fix is release:

admin.py

from django.contrib import admin
from django.contrib.auth.forms import UserChangeForm
from authtools.admin import UserAdmin as AuthtoolsUserAdmin
from authtools.models import User

# HACK: In user admin detail view, the change password link
# doesn't work. This hack fixes the issue until a fix is
# release.
# https://github.com/fusionbox/django-authtools/issues/91
admin.site.unregister(User)

@admin.register(User)
class UserAdmin(AuthtoolsUserAdmin):
    form = UserChangeForm

@jxcl jxcl closed this as completed in e791f2c Dec 18, 2019
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

No branches or pull requests

3 participants